summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol18x.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-12-01 15:59:57 +0100
committerMattes D <github@xoft.cz>2014-12-01 15:59:57 +0100
commita13c75085e755d9456e395edd14543e983a0601d (patch)
tree5a2c61db0c715774fbc8a55918cdcd57c405c1aa /src/Protocol/Protocol18x.cpp
parentMerge pull request #1624 from mc-server/LuaDeprecating (diff)
parentMobSpawner fixes. (diff)
downloadcuberite-a13c75085e755d9456e395edd14543e983a0601d.tar
cuberite-a13c75085e755d9456e395edd14543e983a0601d.tar.gz
cuberite-a13c75085e755d9456e395edd14543e983a0601d.tar.bz2
cuberite-a13c75085e755d9456e395edd14543e983a0601d.tar.lz
cuberite-a13c75085e755d9456e395edd14543e983a0601d.tar.xz
cuberite-a13c75085e755d9456e395edd14543e983a0601d.tar.zst
cuberite-a13c75085e755d9456e395edd14543e983a0601d.zip
Diffstat (limited to 'src/Protocol/Protocol18x.cpp')
-rw-r--r--src/Protocol/Protocol18x.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Protocol/Protocol18x.cpp b/src/Protocol/Protocol18x.cpp
index 8170a494f..ce580d73e 100644
--- a/src/Protocol/Protocol18x.cpp
+++ b/src/Protocol/Protocol18x.cpp
@@ -41,6 +41,7 @@ Implements the 1.8.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"
@@ -2972,6 +2973,18 @@ void cProtocol180::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", cMonster::MobTypeToVanillaName(MobSpawnerEntity.GetEntity()));
+ Writer.AddShort("Delay", MobSpawnerEntity.GetSpawnDelay());
+ Writer.AddString("id", "MobSpawner");
+ break;
+ }
default: break;
}