diff options
Diffstat (limited to '')
-rw-r--r-- | src/BlockEntities/DispenserEntity.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/BlockEntities/DispenserEntity.cpp b/src/BlockEntities/DispenserEntity.cpp index 90732931f..568609998 100644 --- a/src/BlockEntities/DispenserEntity.cpp +++ b/src/BlockEntities/DispenserEntity.cpp @@ -9,7 +9,7 @@ #include "../Entities/Boat.h" #include "../Entities/ProjectileEntity.h" #include "../Simulator/FluidSimulator.h" - +#include "../Items/ItemSpawnEgg.h" @@ -114,7 +114,8 @@ void cDispenserEntity::DropSpenseFromSlot(cChunk & a_Chunk, int a_SlotNum) { double MobX = 0.5 + dispAbsCoord.x; double MobZ = 0.5 + dispAbsCoord.z; - if (m_World->SpawnMob(MobX, dispAbsCoord.y, MobZ, static_cast<eMonsterType>(m_Contents.GetSlot(a_SlotNum).m_ItemDamage), false) != cEntity::INVALID_ID) + auto MonsterType = cItemSpawnEggHandler::ItemDamageToMonsterType(m_Contents.GetSlot(a_SlotNum).m_ItemDamage); + if (m_World->SpawnMob(MobX, dispAbsCoord.y, MobZ, static_cast<eMonsterType>(MonsterType), false) != cEntity::INVALID_ID) { m_Contents.ChangeSlotCount(a_SlotNum, -1); } |