summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol18x.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-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..42f365e80 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", MobSpawnerEntity.GetEntityName());
+ Writer.AddShort("Delay", MobSpawnerEntity.GetSpawnDelay());
+ Writer.AddString("id", "MobSpawner");
+ break;
+ }
default: break;
}