summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol17x.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-12-04 22:04:16 +0100
committerMattes D <github@xoft.cz>2014-12-04 22:04:16 +0100
commitc014f5624c1eda400c08c305978bbcef3f554ff3 (patch)
treefd15deecb2e9afa17443f9b8a8c51676ad6e0145 /src/Protocol/Protocol17x.cpp
parentFixed indent. (diff)
parentMerge pull request #1645 from jonfabe/SpectatorModeFixes (diff)
downloadcuberite-c014f5624c1eda400c08c305978bbcef3f554ff3.tar
cuberite-c014f5624c1eda400c08c305978bbcef3f554ff3.tar.gz
cuberite-c014f5624c1eda400c08c305978bbcef3f554ff3.tar.bz2
cuberite-c014f5624c1eda400c08c305978bbcef3f554ff3.tar.lz
cuberite-c014f5624c1eda400c08c305978bbcef3f554ff3.tar.xz
cuberite-c014f5624c1eda400c08c305978bbcef3f554ff3.tar.zst
cuberite-c014f5624c1eda400c08c305978bbcef3f554ff3.zip
Diffstat (limited to 'src/Protocol/Protocol17x.cpp')
-rw-r--r--src/Protocol/Protocol17x.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp
index 1d108ce9c..1e5fe5586 100644
--- a/src/Protocol/Protocol17x.cpp
+++ b/src/Protocol/Protocol17x.cpp
@@ -42,6 +42,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"
@@ -2662,6 +2663,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", cMonster::MobTypeToVanillaName(MobSpawnerEntity.GetEntity()));
+ Writer.AddShort("Delay", MobSpawnerEntity.GetSpawnDelay());
+ Writer.AddString("id", "MobSpawner");
+ break;
+ }
default: break;
}
@@ -3134,4 +3147,3 @@ void cProtocol176::HandlePacketStatusRequest(cByteBuffer & a_ByteBuffer)
-