summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol_1_14.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Protocol/Protocol_1_14.cpp')
-rw-r--r--src/Protocol/Protocol_1_14.cpp51
1 files changed, 43 insertions, 8 deletions
diff --git a/src/Protocol/Protocol_1_14.cpp b/src/Protocol/Protocol_1_14.cpp
index bc0e68d94..77918c7eb 100644
--- a/src/Protocol/Protocol_1_14.cpp
+++ b/src/Protocol/Protocol_1_14.cpp
@@ -48,6 +48,22 @@ void cProtocol_1_14::SendEditSign(int a_BlockX, int a_BlockY, int a_BlockZ)
+void cProtocol_1_14::SendEntityAnimation(const cEntity & a_Entity, EntityAnimation a_Animation)
+{
+ if (a_Animation == EntityAnimation::PlayerEntersBed)
+ {
+ // Use Bed packet removed, through metadata instead:
+ SendEntityMetadata(a_Entity);
+ return;
+ }
+
+ Super::SendEntityAnimation(a_Entity, a_Animation);
+}
+
+
+
+
+
void cProtocol_1_14::SendLogin(const cPlayer & a_Player, const cWorld & a_World)
{
// Send the Join Game packet:
@@ -115,14 +131,6 @@ void cProtocol_1_14::SendUpdateSign(int a_BlockX, int a_BlockY, int a_BlockZ, co
-void cProtocol_1_14::SendUseBed(const cEntity & a_Entity, int a_BlockX, int a_BlockY, int a_BlockZ)
-{
-}
-
-
-
-
-
UInt32 cProtocol_1_14::GetPacketID(ePacketType a_PacketType)
{
switch (a_PacketType)
@@ -203,6 +211,33 @@ UInt32 cProtocol_1_14::GetProtocolBlockType(BLOCKTYPE a_BlockType, NIBBLETYPE a_
+signed char cProtocol_1_14::GetProtocolEntityStatus(EntityAnimation a_Animation) const
+{
+ switch (a_Animation)
+ {
+ case EntityAnimation::FoxChews: return 45;
+ case EntityAnimation::OcelotTrusts: return 40;
+ case EntityAnimation::OcelotDistrusts: return 41;
+ case EntityAnimation::PawnBerryBushPricks: return 44;
+ case EntityAnimation::PawnChestEquipmentBreaks: return 50;
+ case EntityAnimation::PawnFeetEquipmentBreaks: return 52;
+ case EntityAnimation::PawnHeadEquipmentBreaks: return 49;
+ case EntityAnimation::PawnLegsEquipmentBreaks: return 51;
+ case EntityAnimation::PawnMainHandEquipmentBreaks: return 47;
+ case EntityAnimation::PawnOffHandEquipmentBreaks: return 48;
+ case EntityAnimation::PawnTeleports: return 46;
+ case EntityAnimation::PlayerBadOmenActivates: return 43;
+ case EntityAnimation::RavagerAttacks: return 4;
+ case EntityAnimation::RavagerBecomesStunned: return 39;
+ case EntityAnimation::VillagerSweats: return 42;
+ default: return Super::GetProtocolEntityStatus(a_Animation);
+ }
+}
+
+
+
+
+
UInt32 cProtocol_1_14::GetProtocolItemType(short a_ItemID, short a_ItemDamage)
{
return Palette_1_14::From(PaletteUpgrade::FromItem(a_ItemID, a_ItemDamage));