diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2022-01-02 10:48:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-02 10:48:02 +0100 |
commit | 1616108af3ab62f818d020610f2246dab0daa827 (patch) | |
tree | 21e5589af6dd553233ab705a5c268b2186b90c8a /src/Protocol/Protocol_1_9.cpp | |
parent | Update to mybed 3.1.0 (diff) | |
download | cuberite-1616108af3ab62f818d020610f2246dab0daa827.tar cuberite-1616108af3ab62f818d020610f2246dab0daa827.tar.gz cuberite-1616108af3ab62f818d020610f2246dab0daa827.tar.bz2 cuberite-1616108af3ab62f818d020610f2246dab0daa827.tar.lz cuberite-1616108af3ab62f818d020610f2246dab0daa827.tar.xz cuberite-1616108af3ab62f818d020610f2246dab0daa827.tar.zst cuberite-1616108af3ab62f818d020610f2246dab0daa827.zip |
Diffstat (limited to 'src/Protocol/Protocol_1_9.cpp')
-rw-r--r-- | src/Protocol/Protocol_1_9.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Protocol/Protocol_1_9.cpp b/src/Protocol/Protocol_1_9.cpp index a36e3f53d..d7488a3a6 100644 --- a/src/Protocol/Protocol_1_9.cpp +++ b/src/Protocol/Protocol_1_9.cpp @@ -1482,13 +1482,12 @@ void cProtocol_1_9_0::SendEntitySpawn(const cEntity & a_Entity, const UInt8 a_Ob void cProtocol_1_9_0::WriteBlockEntity(cFastNBTWriter & a_Writer, const cBlockEntity & a_BlockEntity) const { - a_Writer.AddInt("x", a_BlockEntity.GetPosX()); - a_Writer.AddInt("y", a_BlockEntity.GetPosY()); - a_Writer.AddInt("z", a_BlockEntity.GetPosZ()); - if (a_BlockEntity.GetBlockType() == E_BLOCK_MOB_SPAWNER) { auto & MobSpawnerEntity = static_cast<const cMobSpawnerEntity &>(a_BlockEntity); + a_Writer.AddInt("x", a_BlockEntity.GetPosX()); + a_Writer.AddInt("y", a_BlockEntity.GetPosY()); + a_Writer.AddInt("z", a_BlockEntity.GetPosZ()); a_Writer.BeginCompound("SpawnData"); // New: SpawnData compound a_Writer.AddString("id", cMonster::MobTypeToVanillaName(MobSpawnerEntity.GetEntity())); a_Writer.EndCompound(); |