diff options
author | tycho <work.tycho@gmail.com> | 2015-05-19 20:32:10 +0200 |
---|---|---|
committer | tycho <work.tycho@gmail.com> | 2015-05-19 20:32:10 +0200 |
commit | 77f1f58c0a7eb55001b375f1945690ed5c1e87a2 (patch) | |
tree | 99e4b53b2966bd4d9bf545d18ddb7edb89472830 /src/Mobs/Sheep.cpp | |
parent | Added LuaState support for all integral types (diff) | |
download | cuberite-77f1f58c0a7eb55001b375f1945690ed5c1e87a2.tar cuberite-77f1f58c0a7eb55001b375f1945690ed5c1e87a2.tar.gz cuberite-77f1f58c0a7eb55001b375f1945690ed5c1e87a2.tar.bz2 cuberite-77f1f58c0a7eb55001b375f1945690ed5c1e87a2.tar.lz cuberite-77f1f58c0a7eb55001b375f1945690ed5c1e87a2.tar.xz cuberite-77f1f58c0a7eb55001b375f1945690ed5c1e87a2.tar.zst cuberite-77f1f58c0a7eb55001b375f1945690ed5c1e87a2.zip |
Diffstat (limited to 'src/Mobs/Sheep.cpp')
-rw-r--r-- | src/Mobs/Sheep.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Mobs/Sheep.cpp b/src/Mobs/Sheep.cpp index ec24f167e..dcfef8135 100644 --- a/src/Mobs/Sheep.cpp +++ b/src/Mobs/Sheep.cpp @@ -37,10 +37,10 @@ void cSheep::GetDrops(cItems & a_Drops, cEntity * a_Killer) { if (!m_IsSheared) { - a_Drops.push_back(cItem(E_BLOCK_WOOL, 1, m_WoolColor)); + a_Drops.push_back(cItem(E_BLOCK_WOOL, 1, static_cast<short>(m_WoolColor))); } - int LootingLevel = 0; + unsigned int LootingLevel = 0; if (a_Killer != nullptr) { LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(cEnchantments::enchLooting); @@ -65,7 +65,7 @@ void cSheep::OnRightClicked(cPlayer & a_Player) cItems Drops; int NumDrops = m_World->GetTickRandomNumber(2) + 1; - Drops.push_back(cItem(E_BLOCK_WOOL, NumDrops, m_WoolColor)); + Drops.push_back(cItem(E_BLOCK_WOOL, static_cast<char>(NumDrops), static_cast<short>(m_WoolColor))); m_World->SpawnItemPickups(Drops, GetPosX(), GetPosY(), GetPosZ(), 10); m_World->BroadcastSoundEffect("mob.sheep.shear", GetPosX(), GetPosY(), GetPosZ(), 1.0f, 1.0f); } |