summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol_1_11.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Protocol/Protocol_1_11.cpp')
-rw-r--r--src/Protocol/Protocol_1_11.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/Protocol/Protocol_1_11.cpp b/src/Protocol/Protocol_1_11.cpp
index 1e07419ec..9ea6332b8 100644
--- a/src/Protocol/Protocol_1_11.cpp
+++ b/src/Protocol/Protocol_1_11.cpp
@@ -16,6 +16,7 @@ Implements the 1.11 protocol classes:
#include "../WorldStorage/FastNBT.h"
#include "../Entities/Boat.h"
+#include "../Entities/EnderCrystal.h"
#include "../Entities/ExpOrb.h"
#include "../Entities/Minecart.h"
#include "../Entities/FallingBlock.h"
@@ -805,6 +806,22 @@ void cProtocol_1_11_0::WriteEntityMetadata(cPacketizer & a_Pkt, const cEntity &
break;
} // case etItemFrame
+ 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.WriteXYZPosition64(EnderCrystal.GetBeamTarget());
+ }
+ a_Pkt.WriteBEUInt8(8);
+ a_Pkt.WriteBEUInt8(METADATA_TYPE_BOOL);
+ a_Pkt.WriteBool(EnderCrystal.ShowsBottom());
+ break;
+ } // case etEnderCrystal
+
default:
{
break;