summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Pioch <lukas@zgow.de>2020-04-25 09:33:33 +0200
committerTiger Wang <ziwei.tiger@outlook.com>2020-04-25 13:27:39 +0200
commit91ab93816631f42ec75a7e748fe5b4eecd0017fc (patch)
treece1b4eba50701b9e087a7c5f78043bf9788a0f0e
parentCorrected furnace recipes for log (diff)
downloadcuberite-91ab93816631f42ec75a7e748fe5b4eecd0017fc.tar
cuberite-91ab93816631f42ec75a7e748fe5b4eecd0017fc.tar.gz
cuberite-91ab93816631f42ec75a7e748fe5b4eecd0017fc.tar.bz2
cuberite-91ab93816631f42ec75a7e748fe5b4eecd0017fc.tar.lz
cuberite-91ab93816631f42ec75a7e748fe5b4eecd0017fc.tar.xz
cuberite-91ab93816631f42ec75a7e748fe5b4eecd0017fc.tar.zst
cuberite-91ab93816631f42ec75a7e748fe5b4eecd0017fc.zip
-rw-r--r--src/BlockEntities/DispenserEntity.cpp5
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);
}