diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-09-19 23:00:54 +0200 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-09-19 23:00:54 +0200 |
commit | 718eb227abe3b9a0e5277d663e32c6e10d51ab52 (patch) | |
tree | 5be83249ccd5b1ab4d2b87a4fa1597424d4e19b2 /src/Protocol | |
parent | Merge branch 'master' into MobSpawner (diff) | |
download | cuberite-718eb227abe3b9a0e5277d663e32c6e10d51ab52.tar cuberite-718eb227abe3b9a0e5277d663e32c6e10d51ab52.tar.gz cuberite-718eb227abe3b9a0e5277d663e32c6e10d51ab52.tar.bz2 cuberite-718eb227abe3b9a0e5277d663e32c6e10d51ab52.tar.lz cuberite-718eb227abe3b9a0e5277d663e32c6e10d51ab52.tar.xz cuberite-718eb227abe3b9a0e5277d663e32c6e10d51ab52.tar.zst cuberite-718eb227abe3b9a0e5277d663e32c6e10d51ab52.zip |
Diffstat (limited to 'src/Protocol')
-rw-r--r-- | src/Protocol/Protocol17x.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp index 7d80e79fb..49a62e4f3 100644 --- a/src/Protocol/Protocol17x.cpp +++ b/src/Protocol/Protocol17x.cpp @@ -40,6 +40,7 @@ Implements the 1.7.x protocol classes: #include "../BlockEntities/BeaconEntity.h" #include "../BlockEntities/CommandBlockEntity.h" #include "../BlockEntities/MobHeadEntity.h" +#include "../BlockEntities/MobSpawnerEntity.h" #include "../BlockEntities/FlowerPotEntity.h" #include "Bindings/PluginManager.h" @@ -2695,6 +2696,18 @@ void cProtocol172::cPacketizer::WriteBlockEntity(const cBlockEntity & a_BlockEnt Writer.AddString("id", "FlowerPot"); // "Tile Entity ID" - MC wiki; vanilla server always seems to send this though break; } + case E_BLOCK_MOB_SPAWNER: + { + cMobSpawnerEntity & MobSpawnerEntity = (cMobSpawnerEntity &)a_BlockEntity; + + Writer.AddInt("x", MobSpawnerEntity.GetPosX()); + Writer.AddInt("y", MobSpawnerEntity.GetPosY()); + Writer.AddInt("z", MobSpawnerEntity.GetPosZ()); + Writer.AddString("EntityId", MobSpawnerEntity.GetEntityName()); + Writer.AddShort("Delay", MobSpawnerEntity.GetSpawnDelay()); + Writer.AddString("id", "MobSpawner"); + break; + } default: break; } @@ -3151,4 +3164,3 @@ void cProtocol176::HandlePacketStatusRequest(cByteBuffer & a_ByteBuffer) - |