summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol_1_14.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2021-04-10 00:17:01 +0200
committerTiger Wang <ziwei.tiger@outlook.com>2021-04-12 23:35:07 +0200
commit66c211c33afa1dc99f6dc3a03119ad0b99ce50c5 (patch)
treebabedad40cb07493b7521ac15670e35547dd5fcc /src/Protocol/Protocol_1_14.cpp
parentRemove unused GetClassStatic in cWorld (diff)
downloadcuberite-66c211c33afa1dc99f6dc3a03119ad0b99ce50c5.tar
cuberite-66c211c33afa1dc99f6dc3a03119ad0b99ce50c5.tar.gz
cuberite-66c211c33afa1dc99f6dc3a03119ad0b99ce50c5.tar.bz2
cuberite-66c211c33afa1dc99f6dc3a03119ad0b99ce50c5.tar.lz
cuberite-66c211c33afa1dc99f6dc3a03119ad0b99ce50c5.tar.xz
cuberite-66c211c33afa1dc99f6dc3a03119ad0b99ce50c5.tar.zst
cuberite-66c211c33afa1dc99f6dc3a03119ad0b99ce50c5.zip
Diffstat (limited to '')
-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));