summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol_1_11.cpp
diff options
context:
space:
mode:
authorLukas Pioch <lukas@zgow.de>2017-07-07 09:31:45 +0200
committerGitHub <noreply@github.com>2017-07-07 09:31:45 +0200
commit885d8287125439047ca2318f8e349b8da279e612 (patch)
tree2f54b688dba0f49b64544d3c1220a16a6936cd6f /src/Protocol/Protocol_1_11.cpp
parentChanged Lua plugins to only execute files ending in .lua (#3831) (diff)
downloadcuberite-885d8287125439047ca2318f8e349b8da279e612.tar
cuberite-885d8287125439047ca2318f8e349b8da279e612.tar.gz
cuberite-885d8287125439047ca2318f8e349b8da279e612.tar.bz2
cuberite-885d8287125439047ca2318f8e349b8da279e612.tar.lz
cuberite-885d8287125439047ca2318f8e349b8da279e612.tar.xz
cuberite-885d8287125439047ca2318f8e349b8da279e612.tar.zst
cuberite-885d8287125439047ca2318f8e349b8da279e612.zip
Diffstat (limited to 'src/Protocol/Protocol_1_11.cpp')
-rw-r--r--src/Protocol/Protocol_1_11.cpp12
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);