summaryrefslogtreecommitdiffstats
path: root/src/Mobs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Mobs/Chicken.cpp4
-rw-r--r--src/Mobs/Monster.cpp4
-rw-r--r--src/Mobs/Mooshroom.cpp4
3 files changed, 4 insertions, 8 deletions
diff --git a/src/Mobs/Chicken.cpp b/src/Mobs/Chicken.cpp
index cc9609450..07929b3f4 100644
--- a/src/Mobs/Chicken.cpp
+++ b/src/Mobs/Chicken.cpp
@@ -38,10 +38,8 @@ void cChicken::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
m_EggDropTimer == 12000
)
{
- cItems Drops;
m_EggDropTimer = 0;
- Drops.emplace_back(E_ITEM_EGG, static_cast<char>(1));
- m_World->SpawnItemPickups(Drops, GetPosX(), GetPosY(), GetPosZ(), 10);
+ m_World->SpawnItemPickup(GetPosition(), cItem(E_ITEM_EGG));
}
else
{
diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp
index e05264f9f..8e0d3a179 100644
--- a/src/Mobs/Monster.cpp
+++ b/src/Mobs/Monster.cpp
@@ -1514,12 +1514,12 @@ void cMonster::AddRandomDropItem(cItems & a_Drops, unsigned int a_Min, unsigned
auto MaxStackSize = static_cast<unsigned int>(cItem(a_Item).GetMaxStackSize());
while (Count > MaxStackSize)
{
- a_Drops.emplace_back(a_Item, MaxStackSize, a_ItemHealth);
+ a_Drops.emplace_back(a_Item, static_cast<char>(MaxStackSize), a_ItemHealth);
Count -= MaxStackSize;
}
if (Count > 0)
{
- a_Drops.emplace_back(a_Item, Count, a_ItemHealth);
+ a_Drops.emplace_back(a_Item, static_cast<char>(Count), a_ItemHealth);
}
}
diff --git a/src/Mobs/Mooshroom.cpp b/src/Mobs/Mooshroom.cpp
index 35eb7f3d1..ca96da081 100644
--- a/src/Mobs/Mooshroom.cpp
+++ b/src/Mobs/Mooshroom.cpp
@@ -64,9 +64,7 @@ void cMooshroom::OnRightClicked(cPlayer & a_Player)
a_Player.UseEquippedItem();
}
- cItems Drops;
- Drops.emplace_back(E_BLOCK_RED_MUSHROOM, static_cast<char>(5), static_cast<char>(0));
- m_World->SpawnItemPickups(Drops, GetPosX(), GetPosY(), GetPosZ(), 10);
+ m_World->SpawnItemPickup(GetPosition(), cItem(E_BLOCK_RED_MUSHROOM, static_cast<char>(5)));
m_World->SpawnMob(GetPosX(), GetPosY(), GetPosZ(), mtCow, false);
Destroy();
} break;