summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol_1_13.cpp
diff options
context:
space:
mode:
authorPersson-dev <66266021+Persson-dev@users.noreply.github.com>2021-12-29 20:30:09 +0100
committerGitHub <noreply@github.com>2021-12-29 20:30:09 +0100
commit1edc6c8601f9d00751bf7c9f7fcc69d1e18bb46a (patch)
tree798914afc59b513341a86cbb5bd0918333104595 /src/Protocol/Protocol_1_13.cpp
parentImproved farmer AI & Fixed entity loading functions (#5351) (diff)
downloadcuberite-1edc6c8601f9d00751bf7c9f7fcc69d1e18bb46a.tar
cuberite-1edc6c8601f9d00751bf7c9f7fcc69d1e18bb46a.tar.gz
cuberite-1edc6c8601f9d00751bf7c9f7fcc69d1e18bb46a.tar.bz2
cuberite-1edc6c8601f9d00751bf7c9f7fcc69d1e18bb46a.tar.lz
cuberite-1edc6c8601f9d00751bf7c9f7fcc69d1e18bb46a.tar.xz
cuberite-1edc6c8601f9d00751bf7c9f7fcc69d1e18bb46a.tar.zst
cuberite-1edc6c8601f9d00751bf7c9f7fcc69d1e18bb46a.zip
Diffstat (limited to '')
-rw-r--r--src/Protocol/Protocol_1_13.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/Protocol/Protocol_1_13.cpp b/src/Protocol/Protocol_1_13.cpp
index f6919388c..80a1e9df1 100644
--- a/src/Protocol/Protocol_1_13.cpp
+++ b/src/Protocol/Protocol_1_13.cpp
@@ -337,6 +337,7 @@ UInt8 cProtocol_1_13::GetEntityMetadataID(EntityMetadata a_Metadata) const
case EntityMetadata::IllagerFlags: return Insentient;
case EntityMetadata::SpeIlagerSpell: return Insentient + 1;
case EntityMetadata::VexFlags: return Insentient;
+ case EntityMetadata::AbstractSkeletonArmsSwinging: return Insentient;
case EntityMetadata::SpiderClimbing: return Insentient;
case EntityMetadata::WitchAggresive: return Insentient;
case EntityMetadata::WitherFirstHeadTarget: return Insentient;
@@ -366,7 +367,6 @@ UInt8 cProtocol_1_13::GetEntityMetadataID(EntityMetadata a_Metadata) const
case EntityMetadata::EntityPose:
case EntityMetadata::AreaEffectCloudParticleParameter1:
case EntityMetadata::AreaEffectCloudParticleParameter2:
- case EntityMetadata::AbstractSkeletonArmsSwinging:
case EntityMetadata::ZombieUnusedWasType: break;
}
UNREACHABLE("Retrieved invalid metadata for protocol");
@@ -1184,6 +1184,17 @@ void cProtocol_1_13::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_Mo
break;
} // case mtSheep
+ case mtSkeleton:
+ {
+ auto & Skeleton = static_cast<const cSkeleton &>(a_Mob);
+ WriteEntityMetadata(a_Pkt, EntityMetadata::LivingActiveHand, EntityMetadataType::Byte);
+ a_Pkt.WriteBEUInt8(Skeleton.IsChargingBow() ? 0x01 : 0x00);
+
+ WriteEntityMetadata(a_Pkt, EntityMetadata::AbstractSkeletonArmsSwinging, EntityMetadataType::Boolean);
+ a_Pkt.WriteBool(Skeleton.IsChargingBow());
+ break;
+ } // case mtSkeleton
+
case mtSlime:
{
auto & Slime = static_cast<const cSlime &>(a_Mob);
@@ -1354,7 +1365,6 @@ void cProtocol_1_13::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_Mo
case mtGiant:
case mtSilverfish:
- case mtSkeleton:
case mtSquid:
case mtWitherSkeleton:
{