summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol_1_12.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Protocol/Protocol_1_12.cpp')
-rw-r--r--src/Protocol/Protocol_1_12.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/Protocol/Protocol_1_12.cpp b/src/Protocol/Protocol_1_12.cpp
index 31daa96f7..d0e77ae80 100644
--- a/src/Protocol/Protocol_1_12.cpp
+++ b/src/Protocol/Protocol_1_12.cpp
@@ -323,7 +323,7 @@ namespace Metadata_1_12
////////////////////////////////////////////////////////////////////////////////
// cProtocol_1_12:
-void cProtocol_1_12::WriteEntityMetadata(cPacketizer & a_Pkt, const cEntity & a_Entity)
+void cProtocol_1_12::WriteEntityMetadata(cPacketizer & a_Pkt, const cEntity & a_Entity) const
{
using namespace Metadata_1_12;
@@ -380,7 +380,7 @@ void cProtocol_1_12::WriteEntityMetadata(cPacketizer & a_Pkt, const cEntity & a_
a_Pkt.WriteBEUInt8(PLAYER_MAIN_HAND);
a_Pkt.WriteBEUInt8(METADATA_TYPE_BYTE);
- a_Pkt.WriteBEUInt8(static_cast<UInt8>(Player.GetMainHand()));
+ a_Pkt.WriteBEUInt8(Player.IsLeftHanded() ? 0 : 1);
break;
}
case cEntity::etPickup:
@@ -550,7 +550,7 @@ void cProtocol_1_12::WriteEntityMetadata(cPacketizer & a_Pkt, const cEntity & a_
-void cProtocol_1_12::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_Mob)
+void cProtocol_1_12::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_Mob) const
{
using namespace Metadata_1_12;
@@ -982,7 +982,7 @@ void cProtocol_1_12::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_Mo
-UInt32 cProtocol_1_12::GetPacketID(cProtocol::ePacketType a_Packet)
+UInt32 cProtocol_1_12::GetPacketID(cProtocol::ePacketType a_Packet) const
{
switch (a_Packet)
{
@@ -1061,15 +1061,6 @@ void cProtocol_1_12::HandlePacketAdvancementTab(cByteBuffer & a_ByteBuffer)
-cProtocol::Version cProtocol_1_12::GetProtocolVersion()
-{
- return Version::v1_12;
-}
-
-
-
-
-
signed char cProtocol_1_12::GetProtocolEntityStatus(EntityAnimation a_Animation) const
{
switch (a_Animation)
@@ -1084,7 +1075,7 @@ signed char cProtocol_1_12::GetProtocolEntityStatus(EntityAnimation a_Animation)
-UInt32 cProtocol_1_12::GetProtocolMobType(const eMonsterType a_MobType)
+UInt32 cProtocol_1_12::GetProtocolMobType(const eMonsterType a_MobType) const
{
switch (a_MobType)
{
@@ -1098,6 +1089,15 @@ UInt32 cProtocol_1_12::GetProtocolMobType(const eMonsterType a_MobType)
+cProtocol::Version cProtocol_1_12::GetProtocolVersion() const
+{
+ return Version::v1_12;
+}
+
+
+
+
+
bool cProtocol_1_12::HandlePacket(cByteBuffer & a_ByteBuffer, UInt32 a_PacketType)
{
switch (m_State)
@@ -1176,7 +1176,7 @@ bool cProtocol_1_12::HandlePacket(cByteBuffer & a_ByteBuffer, UInt32 a_PacketTyp
////////////////////////////////////////////////////////////////////////////////
// cProtocol_1_12_1:
-UInt32 cProtocol_1_12_1::GetPacketID(ePacketType a_Packet)
+UInt32 cProtocol_1_12_1::GetPacketID(ePacketType a_Packet) const
{
switch (a_Packet)
{
@@ -1219,7 +1219,7 @@ UInt32 cProtocol_1_12_1::GetPacketID(ePacketType a_Packet)
-cProtocol::Version cProtocol_1_12_1::GetProtocolVersion()
+cProtocol::Version cProtocol_1_12_1::GetProtocolVersion() const
{
return Version::v1_12_1;
}
@@ -1305,7 +1305,7 @@ bool cProtocol_1_12_1::HandlePacket(cByteBuffer & a_ByteBuffer, UInt32 a_PacketT
////////////////////////////////////////////////////////////////////////////////
// cProtocol_1_12_2::
-cProtocol::Version cProtocol_1_12_2::GetProtocolVersion()
+cProtocol::Version cProtocol_1_12_2::GetProtocolVersion() const
{
return Version::v1_12_2;
}