summaryrefslogtreecommitdiffstats
path: root/src/Entities
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2022-01-13 21:51:47 +0100
committerAlexander Harkness <me@bearbin.net>2022-01-14 20:43:29 +0100
commit903bcfc61fd031985e55a604293f85c2597a8320 (patch)
treea03926be8f4ba7aef37a1e349a26e541b95c3c0c /src/Entities
parentso much big brain time - it hurts (diff)
downloadcuberite-903bcfc61fd031985e55a604293f85c2597a8320.tar
cuberite-903bcfc61fd031985e55a604293f85c2597a8320.tar.gz
cuberite-903bcfc61fd031985e55a604293f85c2597a8320.tar.bz2
cuberite-903bcfc61fd031985e55a604293f85c2597a8320.tar.lz
cuberite-903bcfc61fd031985e55a604293f85c2597a8320.tar.xz
cuberite-903bcfc61fd031985e55a604293f85c2597a8320.tar.zst
cuberite-903bcfc61fd031985e55a604293f85c2597a8320.zip
Diffstat (limited to 'src/Entities')
-rw-r--r--src/Entities/Pickup.cpp4
-rw-r--r--src/Entities/Player.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/Entities/Pickup.cpp b/src/Entities/Pickup.cpp
index 6cd709e08..05d1cd185 100644
--- a/src/Entities/Pickup.cpp
+++ b/src/Entities/Pickup.cpp
@@ -57,7 +57,7 @@ public:
}
m_Pickup->GetItem().AddCount(static_cast<char>(CombineCount));
- Item.m_ItemCount -= CombineCount;
+ Item.m_ItemCount -= static_cast<char>(CombineCount);
if (Item.m_ItemCount <= 0)
{
@@ -246,7 +246,7 @@ bool cPickup::CollectedBy(cEntity & a_Dest)
}
auto & Villager = static_cast<cVillager &>(Mob);
- int NumAdded = Villager.GetInventory().AddItem(m_Item);
+ char NumAdded = Villager.GetInventory().AddItem(m_Item);
if (NumAdded > 0)
{
m_Item.m_ItemCount -= NumAdded;
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index c5c3114d8..0ec8b9c5a 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -2344,7 +2344,7 @@ void cPlayer::SendBlocksAround(int a_BlockX, int a_BlockY, int a_BlockZ, int a_R
{
for (int x = a_BlockX - a_Range + 1; x < a_BlockX + a_Range; x++)
{
- blks.emplace_back(x, y, z, E_BLOCK_AIR, char(0)); // Use fake blocktype, it will get set later on.
+ blks.emplace_back(x, y, z, E_BLOCK_AIR, NIBBLETYPE(0)); // Use fake blocktype, it will get set later on.
}
}
} // for y