summaryrefslogtreecommitdiffstats
path: root/src/Protocol
diff options
context:
space:
mode:
Diffstat (limited to 'src/Protocol')
-rw-r--r--src/Protocol/Protocol_1_10.cpp17
-rw-r--r--src/Protocol/Protocol_1_11.cpp12
-rw-r--r--src/Protocol/Protocol_1_12.cpp13
-rw-r--r--src/Protocol/Protocol_1_13.cpp1
-rw-r--r--src/Protocol/Protocol_1_8.cpp16
-rw-r--r--src/Protocol/Protocol_1_9.cpp18
6 files changed, 29 insertions, 48 deletions
diff --git a/src/Protocol/Protocol_1_10.cpp b/src/Protocol/Protocol_1_10.cpp
index 38abdb53b..47d27c461 100644
--- a/src/Protocol/Protocol_1_10.cpp
+++ b/src/Protocol/Protocol_1_10.cpp
@@ -889,15 +889,6 @@ void cProtocol_1_10_0::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_
break;
} // case mtSheep
- case mtSkeleton:
- {
- auto & Skeleton = static_cast<const cSkeleton &>(a_Mob);
- a_Pkt.WriteBEUInt8(SKELETON_TYPE);
- a_Pkt.WriteBEUInt8(METADATA_TYPE_VARINT);
- a_Pkt.WriteVarInt32(Skeleton.IsWither() ? 1 : 0);
- break;
- } // case mtSkeleton
-
case mtSlime:
{
auto & Slime = static_cast<const cSlime &>(a_Mob);
@@ -940,6 +931,14 @@ void cProtocol_1_10_0::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_
break;
} // case mtWither
+ case mtWitherSkeleton:
+ {
+ a_Pkt.WriteBEUInt8(SKELETON_TYPE);
+ a_Pkt.WriteBEUInt8(METADATA_TYPE_VARINT);
+ a_Pkt.WriteVarInt32(1); // Is wither skeleton
+ break;
+ } // case mtWitherSkeleton
+
case mtWolf:
{
auto & Wolf = static_cast<const cWolf &>(a_Mob);
diff --git a/src/Protocol/Protocol_1_11.cpp b/src/Protocol/Protocol_1_11.cpp
index 1346d64cf..8a846b540 100644
--- a/src/Protocol/Protocol_1_11.cpp
+++ b/src/Protocol/Protocol_1_11.cpp
@@ -573,6 +573,7 @@ UInt32 cProtocol_1_11_0::GetProtocolMobType(eMonsterType a_MobType)
case mtVillager: return 120;
case mtWitch: return 66;
case mtWither: return 64;
+ case mtWitherSkeleton: return 5;
case mtWolf: return 95;
case mtZombie: return 54;
case mtZombiePigman: return 57;
@@ -1094,17 +1095,6 @@ void cProtocol_1_11_0::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_
break;
} // case mtSheep
- case mtSkeleton:
- {
- // XXX Skeletons are separate entities; all skeletons are currently treated as regular ones
-
- // auto & Skeleton = static_cast<const cSkeleton &>(a_Mob);
- // a_Pkt.WriteBEUInt8(SKELETON_TYPE);
- // a_Pkt.WriteBEUInt8(METADATA_TYPE_VARINT);
- // a_Pkt.WriteVarInt32(Skeleton.IsWither() ? 1 : 0);
- break;
- } // case mtSkeleton
-
case mtSlime:
{
auto & Slime = static_cast<const cSlime &>(a_Mob);
diff --git a/src/Protocol/Protocol_1_12.cpp b/src/Protocol/Protocol_1_12.cpp
index b67a244d6..ee2d7064c 100644
--- a/src/Protocol/Protocol_1_12.cpp
+++ b/src/Protocol/Protocol_1_12.cpp
@@ -815,17 +815,6 @@ void cProtocol_1_12::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_Mo
break;
} // case mtSheep
- case mtSkeleton:
- {
- // XXX Skeletons are separate entities; all skeletons are currently treated as regular ones
-
- // auto & Skeleton = static_cast<const cSkeleton &>(a_Mob);
- // a_Pkt.WriteBEUInt8(SKELETON_TYPE);
- // a_Pkt.WriteBEUInt8(METADATA_TYPE_VARINT);
- // a_Pkt.WriteVarInt32(Skeleton.IsWither() ? 1 : 0);
- break;
- } // case mtSkeleton
-
case mtSlime:
{
auto & Slime = static_cast<const cSlime &>(a_Mob);
@@ -954,7 +943,9 @@ void cProtocol_1_12::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_Mo
case mtGiant:
case mtSilverfish:
+ case mtSkeleton:
case mtSquid:
+ case mtWitherSkeleton:
{
// Mobs with no extra fields
break;
diff --git a/src/Protocol/Protocol_1_13.cpp b/src/Protocol/Protocol_1_13.cpp
index 5aa23e763..70375795f 100644
--- a/src/Protocol/Protocol_1_13.cpp
+++ b/src/Protocol/Protocol_1_13.cpp
@@ -430,6 +430,7 @@ UInt32 cProtocol_1_13::GetProtocolMobType(eMonsterType a_MobType)
case mtVillager: return 79;
case mtWitch: return 82;
case mtWither: return 83;
+ case mtWitherSkeleton: return 84;
case mtWolf: return 86;
case mtZombie: return 87;
case mtZombiePigman: return 53;
diff --git a/src/Protocol/Protocol_1_8.cpp b/src/Protocol/Protocol_1_8.cpp
index 9509fe51e..668ca7542 100644
--- a/src/Protocol/Protocol_1_8.cpp
+++ b/src/Protocol/Protocol_1_8.cpp
@@ -1862,6 +1862,7 @@ UInt32 cProtocol_1_8_0::GetProtocolMobType(eMonsterType a_MobType)
case mtVillager: return 120;
case mtWitch: return 66;
case mtWither: return 64;
+ case mtWitherSkeleton: return 51;
case mtWolf: return 95;
case mtZombie: return 54;
case mtZombiePigman: return 57;
@@ -3714,14 +3715,6 @@ void cProtocol_1_8_0::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_M
break;
} // case mtRabbit
- case mtSkeleton:
- {
- auto & Skeleton = static_cast<const cSkeleton &>(a_Mob);
- a_Pkt.WriteBEUInt8(0x0d);
- a_Pkt.WriteBEUInt8(Skeleton.IsWither() ? 1 : 0);
- break;
- } // case mtSkeleton
-
case mtSlime:
{
auto & Slime = static_cast<const cSlime &>(a_Mob);
@@ -3758,6 +3751,13 @@ void cProtocol_1_8_0::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_M
break;
} // case mtWither
+ case mtWitherSkeleton:
+ {
+ a_Pkt.WriteBEUInt8(0x0d);
+ a_Pkt.WriteBEUInt8(1); // Is wither skeleton
+ break;
+ } // case mtWitherSkeleton
+
case mtWolf:
{
auto & Wolf = static_cast<const cWolf &>(a_Mob);
diff --git a/src/Protocol/Protocol_1_9.cpp b/src/Protocol/Protocol_1_9.cpp
index dbcbce18c..b6fa567fd 100644
--- a/src/Protocol/Protocol_1_9.cpp
+++ b/src/Protocol/Protocol_1_9.cpp
@@ -1918,6 +1918,7 @@ UInt32 cProtocol_1_9_0::GetProtocolMobType(eMonsterType a_MobType)
case mtVillager: return 120;
case mtWitch: return 66;
case mtWither: return 64;
+ case mtWitherSkeleton: return 51;
case mtWolf: return 95;
case mtZombie: return 54;
case mtZombiePigman: return 57;
@@ -4201,15 +4202,6 @@ void cProtocol_1_9_0::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_M
break;
} // case mtSheep
- case mtSkeleton:
- {
- auto & Skeleton = static_cast<const cSkeleton &>(a_Mob);
- a_Pkt.WriteBEUInt8(11); // Index 11: Type
- a_Pkt.WriteBEUInt8(METADATA_TYPE_VARINT);
- a_Pkt.WriteVarInt32(Skeleton.IsWither() ? 1 : 0);
- break;
- } // case mtSkeleton
-
case mtSlime:
{
auto & Slime = static_cast<const cSlime &>(a_Mob);
@@ -4252,6 +4244,14 @@ void cProtocol_1_9_0::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_M
break;
} // case mtWither
+ case mtWitherSkeleton:
+ {
+ a_Pkt.WriteBEUInt8(11); // Index 11: Type
+ a_Pkt.WriteBEUInt8(METADATA_TYPE_VARINT);
+ a_Pkt.WriteVarInt32(1); // Is wither skeleton
+ break;
+ } // case mtWitherSkeleton
+
case mtWolf:
{
auto & Wolf = static_cast<const cWolf &>(a_Mob);