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 --- tests/Generating/Stubs.cpp | 64 +++++++++++++++++++++++++++++----------------- 1 file changed, 40 insertions(+), 24 deletions(-) (limited to 'tests/Generating/Stubs.cpp') diff --git a/tests/Generating/Stubs.cpp b/tests/Generating/Stubs.cpp index 7bbd6b2da..7ccd6305e 100644 --- a/tests/Generating/Stubs.cpp +++ b/tests/Generating/Stubs.cpp @@ -93,30 +93,6 @@ extern "C" int luaopen_lxp(lua_State * a_LuaState) -void cBlockInfo::sHandlerDeleter::operator () (cBlockHandler * a_Handler) -{ - delete a_Handler; -} - - - - - -cBlockInfo::cBlockInfoArray::cBlockInfoArray() -{ - cBlockInfoArray & BlockInfos = *this; - // The piece-loading code uses the handlers for rotations, so we need valid handlers - // Insert dummy handlers: - for (size_t i = 0; i < BlockInfos.size(); i++) - { - BlockInfos[i].m_Handler.reset(new cBlockHandler(static_cast(i))); - } -} - - - - - cBoundingBox::cBoundingBox(double, double, double, double, double, double) { } @@ -409,3 +385,43 @@ std::set cMobSpawner::GetAllowedMobTypes(EMCSBiome a_Biome) { return {}; } + + + + + +cItem::cItem() +{ +} + + + + + +cItem::cItem( + short a_ItemType, + char a_ItemCount, + short a_ItemDamage, + const AString & a_Enchantments, + const AString & a_CustomName, + const AStringVector & a_LoreTable +) +{ +} + + + + + +void cItem::Empty() +{ +} + + + + + +cBlockHandler * cBlockHandler::CreateBlockHandler(BLOCKTYPE a_BlockType) +{ + return new cBlockHandler(a_BlockType); +} -- cgit v1.2.3