diff options
Diffstat (limited to 'src/Protocol/Protocol_1_11.cpp')
-rw-r--r-- | src/Protocol/Protocol_1_11.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Protocol/Protocol_1_11.cpp b/src/Protocol/Protocol_1_11.cpp index 8f9a0b0b9..e4aaa8f6f 100644 --- a/src/Protocol/Protocol_1_11.cpp +++ b/src/Protocol/Protocol_1_11.cpp @@ -30,6 +30,7 @@ Implements the 1.11 protocol classes: #include "../Mobs/IncludeAllMonsters.h" #include "../BlockEntities/BeaconEntity.h" +#include "../BlockEntities/BedEntity.h" #include "../BlockEntities/CommandBlockEntity.h" #include "../BlockEntities/MobHeadEntity.h" #include "../BlockEntities/MobSpawnerEntity.h" @@ -421,6 +422,17 @@ void cProtocol_1_11_0::WriteBlockEntity(cPacketizer & a_Pkt, const cBlockEntity break; } + case E_BLOCK_BED: + { + auto & BedEntity = reinterpret_cast<const cBedEntity &>(a_BlockEntity); + Writer.AddInt("x", BedEntity.GetPosX()); + Writer.AddInt("y", BedEntity.GetPosY()); + Writer.AddInt("z", BedEntity.GetPosZ()); + Writer.AddInt("color", BedEntity.GetColor()); + Writer.AddString("id", "Bed"); // "Tile Entity ID" - MC wiki; vanilla server always seems to send this though + break; + } + case E_BLOCK_COMMAND_BLOCK: { auto & CommandBlockEntity = reinterpret_cast<const cCommandBlockEntity &>(a_BlockEntity); |