summaryrefslogtreecommitdiffstats
path: root/src/Protocol
diff options
context:
space:
mode:
Diffstat (limited to 'src/Protocol')
-rw-r--r--src/Protocol/Protocol_1_10.cpp4
-rw-r--r--src/Protocol/Protocol_1_11.cpp8
-rw-r--r--src/Protocol/Protocol_1_12.cpp8
-rw-r--r--src/Protocol/Protocol_1_13.cpp4
-rw-r--r--src/Protocol/Protocol_1_9.cpp4
5 files changed, 14 insertions, 14 deletions
diff --git a/src/Protocol/Protocol_1_10.cpp b/src/Protocol/Protocol_1_10.cpp
index d1b48c11a..6a39589e3 100644
--- a/src/Protocol/Protocol_1_10.cpp
+++ b/src/Protocol/Protocol_1_10.cpp
@@ -543,14 +543,14 @@ void cProtocol_1_10_0::WriteEntityMetadata(cPacketizer & a_Pkt, const cEntity &
case cEntity::etEnderCrystal:
{
const auto & EnderCrystal = static_cast<const cEnderCrystal &>(a_Entity);
- a_Pkt.WriteBEUInt8(7);
+ a_Pkt.WriteBEUInt8(ENDER_CRYSTAL_BEAM_TARGET);
a_Pkt.WriteBEUInt8(METADATA_TYPE_OPTIONAL_POSITION);
a_Pkt.WriteBool(EnderCrystal.DisplaysBeam());
if (EnderCrystal.DisplaysBeam())
{
a_Pkt.WriteXYZPosition64(EnderCrystal.GetBeamTarget());
}
- a_Pkt.WriteBEUInt8(8);
+ a_Pkt.WriteBEUInt8(ENDER_CRYSTAL_SHOW_BOTTOM);
a_Pkt.WriteBEUInt8(METADATA_TYPE_BOOL);
a_Pkt.WriteBool(EnderCrystal.ShowsBottom());
break;
diff --git a/src/Protocol/Protocol_1_11.cpp b/src/Protocol/Protocol_1_11.cpp
index 9ea6332b8..d475bd005 100644
--- a/src/Protocol/Protocol_1_11.cpp
+++ b/src/Protocol/Protocol_1_11.cpp
@@ -809,14 +809,14 @@ void cProtocol_1_11_0::WriteEntityMetadata(cPacketizer & a_Pkt, const cEntity &
case cEntity::etEnderCrystal:
{
const auto & EnderCrystal = static_cast<const cEnderCrystal &>(a_Entity);
- a_Pkt.WriteBEUInt8(7);
- a_Pkt.WriteBEUInt8(METADATA_TYPE_OPTIONAL_POSITION);
- a_Pkt.WriteBool(EnderCrystal.DisplaysBeam());
if (EnderCrystal.DisplaysBeam())
{
+ a_Pkt.WriteBEUInt8(ENDER_CRYSTAL_BEAM_TARGET);
+ a_Pkt.WriteBEUInt8(METADATA_TYPE_OPTIONAL_POSITION);
+ a_Pkt.WriteBool(true); // Dont do a second check if it should display the beam
a_Pkt.WriteXYZPosition64(EnderCrystal.GetBeamTarget());
}
- a_Pkt.WriteBEUInt8(8);
+ a_Pkt.WriteBEUInt8(ENDER_CRYSTAL_SHOW_BOTTOM);
a_Pkt.WriteBEUInt8(METADATA_TYPE_BOOL);
a_Pkt.WriteBool(EnderCrystal.ShowsBottom());
break;
diff --git a/src/Protocol/Protocol_1_12.cpp b/src/Protocol/Protocol_1_12.cpp
index ee2016ae2..4e0d2b063 100644
--- a/src/Protocol/Protocol_1_12.cpp
+++ b/src/Protocol/Protocol_1_12.cpp
@@ -522,14 +522,14 @@ void cProtocol_1_12::WriteEntityMetadata(cPacketizer & a_Pkt, const cEntity & a_
case cEntity::etEnderCrystal:
{
const auto & EnderCrystal = static_cast<const cEnderCrystal &>(a_Entity);
- a_Pkt.WriteBEUInt8(7);
- a_Pkt.WriteBEUInt8(METADATA_TYPE_OPTIONAL_POSITION);
- a_Pkt.WriteBool(EnderCrystal.DisplaysBeam());
if (EnderCrystal.DisplaysBeam())
{
+ a_Pkt.WriteBEUInt8(ENDER_CRYSTAL_BEAM_TARGET);
+ a_Pkt.WriteBEUInt8(METADATA_TYPE_OPTIONAL_POSITION);
+ a_Pkt.WriteBool(true); // Dont do a second check if it should display the beam
a_Pkt.WriteXYZPosition64(EnderCrystal.GetBeamTarget());
}
- a_Pkt.WriteBEUInt8(8);
+ a_Pkt.WriteBEUInt8(ENDER_CRYSTAL_SHOW_BOTTOM);
a_Pkt.WriteBEUInt8(METADATA_TYPE_BOOL);
a_Pkt.WriteBool(EnderCrystal.ShowsBottom());
break;
diff --git a/src/Protocol/Protocol_1_13.cpp b/src/Protocol/Protocol_1_13.cpp
index efc1e9fc1..a61c094f4 100644
--- a/src/Protocol/Protocol_1_13.cpp
+++ b/src/Protocol/Protocol_1_13.cpp
@@ -891,10 +891,10 @@ void cProtocol_1_13::WriteEntityMetadata(cPacketizer & a_Pkt, const cEntity & a_
case cEntity::etEnderCrystal:
{
const auto & EnderCrystal = static_cast<const cEnderCrystal &>(a_Entity);
- WriteEntityMetadata(a_Pkt, EntityMetadata::EnderCrystalBeamTarget, EntityMetadataType::OptPosition);
- a_Pkt.WriteBool(EnderCrystal.DisplaysBeam());
if (EnderCrystal.DisplaysBeam())
{
+ WriteEntityMetadata(a_Pkt, EntityMetadata::EnderCrystalBeamTarget, EntityMetadataType::OptPosition);
+ a_Pkt.WriteBool(true); // Dont do a second check if it should display the beam
a_Pkt.WriteXYZPosition64(EnderCrystal.GetBeamTarget());
}
WriteEntityMetadata(a_Pkt, EntityMetadata::EnderCrystalShowBottom, EntityMetadataType::Boolean);
diff --git a/src/Protocol/Protocol_1_9.cpp b/src/Protocol/Protocol_1_9.cpp
index 778d4ca30..eff9c8530 100644
--- a/src/Protocol/Protocol_1_9.cpp
+++ b/src/Protocol/Protocol_1_9.cpp
@@ -1731,14 +1731,14 @@ void cProtocol_1_9_0::WriteEntityMetadata(cPacketizer & a_Pkt, const cEntity & a
case cEntity::etEnderCrystal:
{
const auto & EnderCrystal = static_cast<const cEnderCrystal &>(a_Entity);
- a_Pkt.WriteBEUInt8(7);
+ a_Pkt.WriteBEUInt8(5);
a_Pkt.WriteBEUInt8(METADATA_TYPE_OPTIONAL_POSITION);
a_Pkt.WriteBool(EnderCrystal.DisplaysBeam());
if (EnderCrystal.DisplaysBeam())
{
a_Pkt.WriteXYZPosition64(EnderCrystal.GetBeamTarget());
}
- a_Pkt.WriteBEUInt8(8);
+ a_Pkt.WriteBEUInt8(6);
a_Pkt.WriteBEUInt8(METADATA_TYPE_BOOL);
a_Pkt.WriteBool(EnderCrystal.ShowsBottom());
break;