diff options
Diffstat (limited to 'src/Protocol/Protocol_1_8.cpp')
-rw-r--r-- | src/Protocol/Protocol_1_8.cpp | 32 |
1 files changed, 7 insertions, 25 deletions
diff --git a/src/Protocol/Protocol_1_8.cpp b/src/Protocol/Protocol_1_8.cpp index a00ce20c9..755bcb969 100644 --- a/src/Protocol/Protocol_1_8.cpp +++ b/src/Protocol/Protocol_1_8.cpp @@ -3089,10 +3089,6 @@ void cProtocol_1_8_0::SendPacket(cPacketizer & a_Pkt) void cProtocol_1_8_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()); - switch (a_BlockEntity.GetBlockType()) { case E_BLOCK_WALL_BANNER: @@ -3102,16 +3098,12 @@ void cProtocol_1_8_0::WriteBlockEntity(cFastNBTWriter & a_Writer, const cBlockEn a_Writer.AddInt("Base", static_cast<Int32>(BannerEntity.GetBaseColor())); break; } - case E_BLOCK_BEACON: + case E_BLOCK_CHEST: { - auto & BeaconEntity = static_cast<const cBeaconEntity &>(a_BlockEntity); - a_Writer.AddInt("Primary", BeaconEntity.GetPrimaryEffect()); - a_Writer.AddInt("Secondary", BeaconEntity.GetSecondaryEffect()); - a_Writer.AddInt("Levels", BeaconEntity.GetBeaconLevel()); + // Nothing! break; } - case E_BLOCK_COMMAND_BLOCK: { auto & CommandBlockEntity = static_cast<const cCommandBlockEntity &>(a_BlockEntity); @@ -3128,23 +3120,12 @@ void cProtocol_1_8_0::WriteBlockEntity(cFastNBTWriter & a_Writer, const cBlockEn } break; } - case E_BLOCK_ENCHANTMENT_TABLE: - { - auto & EnchantingTableEntity = static_cast<const cEnchantingTableEntity &>(a_BlockEntity); - if (!EnchantingTableEntity.GetCustomName().empty()) - { - a_Writer.AddString("CustomName", EnchantingTableEntity.GetCustomName()); - } - break; - } - case E_BLOCK_END_PORTAL: { // Nothing! break; } - case E_BLOCK_HEAD: { auto & MobHeadEntity = static_cast<const cMobHeadEntity &>(a_BlockEntity); @@ -3166,7 +3147,6 @@ void cProtocol_1_8_0::WriteBlockEntity(cFastNBTWriter & a_Writer, const cBlockEn a_Writer.EndCompound(); break; } - case E_BLOCK_FLOWER_POT: { auto & FlowerPotEntity = static_cast<const cFlowerPotEntity &>(a_BlockEntity); @@ -3174,7 +3154,6 @@ void cProtocol_1_8_0::WriteBlockEntity(cFastNBTWriter & a_Writer, const cBlockEn a_Writer.AddInt("Data", static_cast<Int32>(FlowerPotEntity.GetItem().m_ItemDamage)); break; } - case E_BLOCK_MOB_SPAWNER: { auto & MobSpawnerEntity = static_cast<const cMobSpawnerEntity &>(a_BlockEntity); @@ -3182,12 +3161,15 @@ void cProtocol_1_8_0::WriteBlockEntity(cFastNBTWriter & a_Writer, const cBlockEn a_Writer.AddShort("Delay", MobSpawnerEntity.GetSpawnDelay()); break; } - default: { - break; + return; } } + + a_Writer.AddInt("x", a_BlockEntity.GetPosX()); + a_Writer.AddInt("y", a_BlockEntity.GetPosY()); + a_Writer.AddInt("z", a_BlockEntity.GetPosZ()); } |