summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol_1_10.cpp
diff options
context:
space:
mode:
author12xx12 <44411062+12xx12@users.noreply.github.com>2020-10-29 21:47:20 +0100
committerGitHub <noreply@github.com>2020-10-29 21:47:20 +0100
commit961d5eb420182add0b6cb4d92f260b885563389c (patch)
treec63fb7b3905d2ae59c539cca44845984128c27bb /src/Protocol/Protocol_1_10.cpp
parentRemove BLOCKENTITY_PROTODEF (diff)
downloadcuberite-961d5eb420182add0b6cb4d92f260b885563389c.tar
cuberite-961d5eb420182add0b6cb4d92f260b885563389c.tar.gz
cuberite-961d5eb420182add0b6cb4d92f260b885563389c.tar.bz2
cuberite-961d5eb420182add0b6cb4d92f260b885563389c.tar.lz
cuberite-961d5eb420182add0b6cb4d92f260b885563389c.tar.xz
cuberite-961d5eb420182add0b6cb4d92f260b885563389c.tar.zst
cuberite-961d5eb420182add0b6cb4d92f260b885563389c.zip
Diffstat (limited to 'src/Protocol/Protocol_1_10.cpp')
-rw-r--r--src/Protocol/Protocol_1_10.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/Protocol/Protocol_1_10.cpp b/src/Protocol/Protocol_1_10.cpp
index f40bf7b73..d1b48c11a 100644
--- a/src/Protocol/Protocol_1_10.cpp
+++ b/src/Protocol/Protocol_1_10.cpp
@@ -21,6 +21,7 @@ Implements the 1.10 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"
@@ -539,6 +540,22 @@ void cProtocol_1_10_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;