summaryrefslogtreecommitdiffstats
path: root/src/Protocol
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-11-18 15:33:41 +0100
committerHowaner <franzi.moos@googlemail.com>2014-11-18 15:33:41 +0100
commit8b028c5c78e53c149dfa8b3e7ec878f7f0428f1d (patch)
tree8b45393b6cc7095482dc377c2448e06d408830f9 /src/Protocol
parentMerge branch 'master' into MobSpawner (diff)
downloadcuberite-8b028c5c78e53c149dfa8b3e7ec878f7f0428f1d.tar
cuberite-8b028c5c78e53c149dfa8b3e7ec878f7f0428f1d.tar.gz
cuberite-8b028c5c78e53c149dfa8b3e7ec878f7f0428f1d.tar.bz2
cuberite-8b028c5c78e53c149dfa8b3e7ec878f7f0428f1d.tar.lz
cuberite-8b028c5c78e53c149dfa8b3e7ec878f7f0428f1d.tar.xz
cuberite-8b028c5c78e53c149dfa8b3e7ec878f7f0428f1d.tar.zst
cuberite-8b028c5c78e53c149dfa8b3e7ec878f7f0428f1d.zip
Diffstat (limited to 'src/Protocol')
-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;
}