diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-07-30 21:59:35 +0200 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-07-30 21:59:35 +0200 |
commit | 89b1bbdc5fca5a51df1a5dd18ce91f27cb667c04 (patch) | |
tree | 7d22e13df345884785abbc167a4818235fd61e0a /src/Protocol | |
parent | Merged branch 'howaner/Options'. (diff) | |
download | cuberite-89b1bbdc5fca5a51df1a5dd18ce91f27cb667c04.tar cuberite-89b1bbdc5fca5a51df1a5dd18ce91f27cb667c04.tar.gz cuberite-89b1bbdc5fca5a51df1a5dd18ce91f27cb667c04.tar.bz2 cuberite-89b1bbdc5fca5a51df1a5dd18ce91f27cb667c04.tar.lz cuberite-89b1bbdc5fca5a51df1a5dd18ce91f27cb667c04.tar.xz cuberite-89b1bbdc5fca5a51df1a5dd18ce91f27cb667c04.tar.zst cuberite-89b1bbdc5fca5a51df1a5dd18ce91f27cb667c04.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Protocol/Protocol17x.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp index 45d39e0e9..8a68edd1f 100644 --- a/src/Protocol/Protocol17x.cpp +++ b/src/Protocol/Protocol17x.cpp @@ -37,6 +37,7 @@ Implements the 1.7.x protocol classes: #include "../Mobs/IncludeAllMonsters.h" #include "../UI/Window.h" +#include "../BlockEntities/BeaconEntity.h" #include "../BlockEntities/CommandBlockEntity.h" #include "../BlockEntities/MobHeadEntity.h" #include "../BlockEntities/FlowerPotEntity.h" @@ -1328,6 +1329,7 @@ void cProtocol172::SendUpdateBlockEntity(cBlockEntity & a_BlockEntity) { case E_BLOCK_MOB_SPAWNER: Action = 1; break; // Update mob spawner spinny mob thing case E_BLOCK_COMMAND_BLOCK: Action = 2; break; // Update command block text + case E_BLOCK_BEACON: Action = 3; break; // Update beacon entity case E_BLOCK_HEAD: Action = 4; break; // Update Mobhead entity case E_BLOCK_FLOWER_POT: Action = 5; break; // Update flower pot default: ASSERT(!"Unhandled or unimplemented BlockEntity update request!"); break; @@ -2581,6 +2583,19 @@ void cProtocol172::cPacketizer::WriteBlockEntity(const cBlockEntity & a_BlockEnt switch (a_BlockEntity.GetBlockType()) { + case E_BLOCK_BEACON: + { + cBeaconEntity & BeaconEntity = (cBeaconEntity &)a_BlockEntity; + + Writer.AddInt("x", BeaconEntity.GetPosX()); + Writer.AddInt("y", BeaconEntity.GetPosY()); + Writer.AddInt("z", BeaconEntity.GetPosZ()); + Writer.AddInt("Primary", BeaconEntity.GetPrimaryPotion()); + Writer.AddInt("Secondary", BeaconEntity.GetSecondaryPotion()); + Writer.AddInt("Levels", BeaconEntity.GetBeaconLevel()); + Writer.AddString("id", "Beacon"); // "Tile Entity ID" - MC wiki; vanilla server always seems to send this though + break; + } case E_BLOCK_COMMAND_BLOCK: { cCommandBlockEntity & CommandBlockEntity = (cCommandBlockEntity &)a_BlockEntity; |