summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol_1_13.cpp
diff options
context:
space:
mode:
authorpeterbell10 <peterbell10@live.co.uk>2020-10-05 12:27:14 +0200
committerGitHub <noreply@github.com>2020-10-05 12:27:14 +0200
commita9031b6bae742b333b1b390192fa590f2ecb07ea (patch)
treeb2802c81d24d339c201a0747d66ba44e9ea8b1b0 /src/Protocol/Protocol_1_13.cpp
parentFixed current end generator (#4968) (diff)
downloadcuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.tar
cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.tar.gz
cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.tar.bz2
cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.tar.lz
cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.tar.xz
cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.tar.zst
cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.zip
Diffstat (limited to 'src/Protocol/Protocol_1_13.cpp')
-rw-r--r--src/Protocol/Protocol_1_13.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Protocol/Protocol_1_13.cpp b/src/Protocol/Protocol_1_13.cpp
index 0259565f5..1b505d58d 100644
--- a/src/Protocol/Protocol_1_13.cpp
+++ b/src/Protocol/Protocol_1_13.cpp
@@ -315,7 +315,9 @@ void cProtocol_1_13::HandlePacketSetBeaconEffect(cByteBuffer & a_ByteBuffer)
{
HANDLE_READ(a_ByteBuffer, ReadVarInt32, UInt32, Effect1);
HANDLE_READ(a_ByteBuffer, ReadVarInt32, UInt32, Effect2);
- m_Client->HandleBeaconSelection(Effect1, Effect2);
+ m_Client->HandleBeaconSelection(
+ static_cast<int>(Effect1), static_cast<int>(Effect2)
+ );
}
@@ -655,7 +657,7 @@ bool cProtocol_1_13::ReadItem(cByteBuffer & a_ByteBuffer, cItem & a_Item, size_t
return true;
}
- const auto Translated = GetItemFromProtocolID(ItemID);
+ const auto Translated = GetItemFromProtocolID(ToUnsigned(ItemID));
a_Item.m_ItemType = Translated.first;
a_Item.m_ItemDamage = Translated.second;
@@ -698,7 +700,7 @@ void cProtocol_1_13::WriteItem(cPacketizer & a_Pkt, const cItem & a_Item)
}
// Normal item
- a_Pkt.WriteBEInt16(GetProtocolItemType(a_Item.m_ItemType, a_Item.m_ItemDamage));
+ a_Pkt.WriteBEInt16(static_cast<Int16>(GetProtocolItemType(a_Item.m_ItemType, a_Item.m_ItemDamage)));
a_Pkt.WriteBEInt8(a_Item.m_ItemCount);
// TODO: NBT