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/Bindings/AllToLua.pkg | 2 +- src/Bindings/CMakeLists.txt | 2 +- src/Bindings/DeprecatedBindings.cpp | 1 + src/Bindings/PluginManager.h | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src/Bindings') diff --git a/src/Bindings/AllToLua.pkg b/src/Bindings/AllToLua.pkg index 778cdf42c..1af7e8a21 100644 --- a/src/Bindings/AllToLua.pkg +++ b/src/Bindings/AllToLua.pkg @@ -42,7 +42,7 @@ $cfile "Plugin.h" $cfile "PluginLua.h" $cfile "LuaWindow.h" -$cfile "../BlockID.h" +$cfile "../BlockType.h" $cfile "../BlockInfo.h" $cfile "../StringUtils.h" $cfile "../Defines.h" diff --git a/src/Bindings/CMakeLists.txt b/src/Bindings/CMakeLists.txt index 17f2bdf39..ccd3f4dde 100644 --- a/src/Bindings/CMakeLists.txt +++ b/src/Bindings/CMakeLists.txt @@ -79,7 +79,7 @@ set(BINDING_DEPENDENCIES ../BlockEntities/SignEntity.h ../BlockEntities/MobHeadEntity.h ../BlockEntities/FlowerPotEntity.h - ../BlockID.h + ../BlockType.h ../BlockInfo.h ../BoundingBox.h ../ChatColor.h diff --git a/src/Bindings/DeprecatedBindings.cpp b/src/Bindings/DeprecatedBindings.cpp index a297179f0..b9969ca65 100644 --- a/src/Bindings/DeprecatedBindings.cpp +++ b/src/Bindings/DeprecatedBindings.cpp @@ -10,6 +10,7 @@ #include "../Entities/Player.h" #include "LuaState.h" #include "../Tracer.h" +#include "../BlockInfo.h" diff --git a/src/Bindings/PluginManager.h b/src/Bindings/PluginManager.h index 04dbed67d..79b7511ea 100644 --- a/src/Bindings/PluginManager.h +++ b/src/Bindings/PluginManager.h @@ -2,6 +2,7 @@ #pragma once +#include "../BlockType.h" #include "../Defines.h" #include "../FunctionRef.h" -- cgit v1.2.3