diff options
Diffstat (limited to '')
-rw-r--r-- | src/Blocks/BlockBrewingStand.h | 21 | ||||
-rw-r--r-- | src/Blocks/BlockFurnace.h | 21 |
2 files changed, 36 insertions, 6 deletions
diff --git a/src/Blocks/BlockBrewingStand.h b/src/Blocks/BlockBrewingStand.h index 48158ef73..a37b897fa 100644 --- a/src/Blocks/BlockBrewingStand.h +++ b/src/Blocks/BlockBrewingStand.h @@ -1,7 +1,7 @@ #pragma once -#include "BlockEntity.h" +#include "../BlockEntities/BrewingstandEntity.h" #include "Mixins.h" @@ -9,9 +9,9 @@ class cBlockBrewingStandHandler : - public cClearMetaOnDrop<cMetaRotator<cBlockEntityHandler, 0x07, 0x02, 0x05, 0x03, 0x04>> + public cMetaRotator<cBlockEntityHandler, 0x07, 0x02, 0x05, 0x03, 0x04> { - using super = cClearMetaOnDrop<cMetaRotator<cBlockEntityHandler, 0x07, 0x02, 0x05, 0x03, 0x04>>; + using super = cMetaRotator<cBlockEntityHandler, 0x07, 0x02, 0x05, 0x03, 0x04>; public: @@ -24,6 +24,21 @@ public: + virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, const cEntity * a_Digger, const cItem * a_Tool) override + { + cItems res(cItem(E_ITEM_BREWING_STAND, 1)); // We have to drop the item form of a brewing stand + if (a_BlockEntity != nullptr) + { + auto be = static_cast<cBrewingstandEntity *>(a_BlockEntity); + res.AddItemGrid(be->GetContents()); + } + return res; + } + + + + + virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) override { UNUSED(a_Meta); diff --git a/src/Blocks/BlockFurnace.h b/src/Blocks/BlockFurnace.h index 4a0459bf0..9a59f95f8 100644 --- a/src/Blocks/BlockFurnace.h +++ b/src/Blocks/BlockFurnace.h @@ -1,17 +1,17 @@ #pragma once -#include "BlockEntity.h" #include "../Blocks/BlockPiston.h" +#include "../BlockEntities/FurnaceEntity.h" #include "Mixins.h" class cBlockFurnaceHandler : - public cClearMetaOnDrop<cMetaRotator<cBlockEntityHandler, 0x07, 0x02, 0x05, 0x03, 0x04>> + public cMetaRotator<cBlockEntityHandler, 0x07, 0x02, 0x05, 0x03, 0x04> { - using super = cClearMetaOnDrop<cMetaRotator<cBlockEntityHandler, 0x07, 0x02, 0x05, 0x03, 0x04>>; + using super = cMetaRotator<cBlockEntityHandler, 0x07, 0x02, 0x05, 0x03, 0x04>; public: @@ -43,6 +43,21 @@ public: + virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, const cEntity * a_Digger, const cItem * a_Tool) override + { + cItems res(cItem(E_BLOCK_FURNACE, 1)); // We can't drop a lit furnace + if (a_BlockEntity != nullptr) + { + auto be = static_cast<cFurnaceEntity *>(a_BlockEntity); + res.AddItemGrid(be->GetContents()); + } + return res; + } + + + + + virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) override { UNUSED(a_Meta); |