summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol_1_9.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_9.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_9.cpp44
1 files changed, 31 insertions, 13 deletions
diff --git a/src/Protocol/Protocol_1_9.cpp b/src/Protocol/Protocol_1_9.cpp
index 0ae451117..6b240b235 100644
--- a/src/Protocol/Protocol_1_9.cpp
+++ b/src/Protocol/Protocol_1_9.cpp
@@ -367,19 +367,6 @@ void cProtocol_1_9_0::SendEntityPosition(const cEntity & a_Entity)
-void cProtocol_1_9_0::SendEntityStatus(const cEntity & a_Entity, char a_Status)
-{
- ASSERT(m_State == 3); // In game mode?
-
- cPacketizer Pkt(*this, pktEntityStatus);
- Pkt.WriteBEUInt32(a_Entity.GetUniqueID());
- Pkt.WriteBEInt8(a_Status);
-}
-
-
-
-
-
void cProtocol_1_9_0::SendExperienceOrb(const cExpOrb & a_ExpOrb)
{
ASSERT(m_State == 3); // In game mode?
@@ -708,6 +695,37 @@ UInt32 cProtocol_1_9_0::GetPacketID(cProtocol::ePacketType a_Packet)
+unsigned char cProtocol_1_9_0::GetProtocolEntityAnimation(const EntityAnimation a_Animation) const
+{
+ if (a_Animation == EntityAnimation::PlayerOffHandSwings)
+ {
+ return 3;
+ }
+
+ return Super::GetProtocolEntityAnimation(a_Animation);
+}
+
+
+
+
+
+signed char cProtocol_1_9_0::GetProtocolEntityStatus(const EntityAnimation a_Animation) const
+{
+ switch (a_Animation)
+ {
+ case EntityAnimation::ArmorStandGetsHit: return 32;
+ case EntityAnimation::ArrowTipSparkles: return 0;
+ case EntityAnimation::PawnShieldBlocks: return 29;
+ case EntityAnimation::PawnShieldBreaks: return 30;
+ case EntityAnimation::PawnThornsPricks: return 33;
+ default: return Super::GetProtocolEntityStatus(a_Animation);
+ }
+}
+
+
+
+
+
cProtocol::Version cProtocol_1_9_0::GetProtocolVersion()
{
return Version::v1_9_0;