From 01b8ed5295875262a91b60af878bf2a18c1b7aae Mon Sep 17 00:00:00 2001 From: Mattes D Date: Fri, 3 Apr 2020 08:57:01 +0200 Subject: Pulled the BlockID and BlockInfo headers from Globals.h. (#4591) The BlockID.h file was removed from Globals.h and renamed to BlockType.h (main change) The BlockInfo.h file was removed from Globals.h (main change) The ENUM_BLOCK_ID and ENUM_ITEM_ID enum names were replaced with ENUM_BLOCK_TYPE and ENUM_ITEM_TYPE (cosmetics) The various enums, such as eDimension, eDamageType and eExplosionSource were moved from BlockType.h to Defines.h, together with the helper functions for converting between them and strings (StringToDimension et al.) (minor) Many inline functions were moved from headers to their respective cpp files, so that BlockType.h could be included only into the cpp file, rather than the header. That broke our tests a bit, since they pick bits and pieces out of the main code and provide stubs for the rest; they had to be re-stubbed and re-verified. eMonsterType values are no longer tied to E_ITEM_SPAWN_EGG_META_* values --- src/BlockEntities/BeaconEntity.cpp | 1 + src/BlockEntities/BedEntity.h | 1 + src/BlockEntities/ChestEntity.cpp | 1 + src/BlockEntities/DispenserEntity.cpp | 6 +++--- src/BlockEntities/EnderChestEntity.cpp | 1 + src/BlockEntities/JukeboxEntity.h | 1 + 6 files changed, 8 insertions(+), 3 deletions(-) (limited to 'src/BlockEntities') diff --git a/src/BlockEntities/BeaconEntity.cpp b/src/BlockEntities/BeaconEntity.cpp index 4c830fb61..00ef145fb 100644 --- a/src/BlockEntities/BeaconEntity.cpp +++ b/src/BlockEntities/BeaconEntity.cpp @@ -2,6 +2,7 @@ #include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules #include "BeaconEntity.h" +#include "../BlockInfo.h" #include "../BlockArea.h" #include "../Entities/Player.h" #include "../UI/BeaconWindow.h" diff --git a/src/BlockEntities/BedEntity.h b/src/BlockEntities/BedEntity.h index 6878a6429..265ed43dd 100644 --- a/src/BlockEntities/BedEntity.h +++ b/src/BlockEntities/BedEntity.h @@ -4,6 +4,7 @@ #pragma once #include "BlockEntity.h" +#include "../BlockType.h" diff --git a/src/BlockEntities/ChestEntity.cpp b/src/BlockEntities/ChestEntity.cpp index c73ff1985..902c9b17a 100644 --- a/src/BlockEntities/ChestEntity.cpp +++ b/src/BlockEntities/ChestEntity.cpp @@ -2,6 +2,7 @@ #include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules #include "ChestEntity.h" +#include "../BlockInfo.h" #include "../Item.h" #include "../Entities/Player.h" #include "../UI/ChestWindow.h" diff --git a/src/BlockEntities/DispenserEntity.cpp b/src/BlockEntities/DispenserEntity.cpp index 268a108c2..95e3c46b9 100644 --- a/src/BlockEntities/DispenserEntity.cpp +++ b/src/BlockEntities/DispenserEntity.cpp @@ -2,13 +2,13 @@ #include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules #include "DispenserEntity.h" -#include "../Simulator/FluidSimulator.h" -#include "../Entities/Boat.h" #include "../Chunk.h" - +#include "../BlockInfo.h" #include "../Defines.h" #include "../World.h" +#include "../Entities/Boat.h" #include "../Entities/ProjectileEntity.h" +#include "../Simulator/FluidSimulator.h" diff --git a/src/BlockEntities/EnderChestEntity.cpp b/src/BlockEntities/EnderChestEntity.cpp index 5f9e2d969..c324f1cec 100644 --- a/src/BlockEntities/EnderChestEntity.cpp +++ b/src/BlockEntities/EnderChestEntity.cpp @@ -3,6 +3,7 @@ #include "EnderChestEntity.h" #include "json/json.h" +#include "../BlockInfo.h" #include "../Item.h" #include "../Entities/Player.h" #include "../UI/EnderChestWindow.h" diff --git a/src/BlockEntities/JukeboxEntity.h b/src/BlockEntities/JukeboxEntity.h index 2fbd916eb..532f8905a 100644 --- a/src/BlockEntities/JukeboxEntity.h +++ b/src/BlockEntities/JukeboxEntity.h @@ -2,6 +2,7 @@ #pragma once #include "BlockEntity.h" +#include "../BlockType.h" -- cgit v1.2.3