From 272a8029e0b8280f61ad2d3bfd0e8353d4256aec Mon Sep 17 00:00:00 2001 From: KingCol13 <48412633+KingCol13@users.noreply.github.com> Date: Sat, 19 Sep 2020 07:59:21 +0100 Subject: Fix silk-touching glowing redstone (#4893) * Add src/BlocksRedstoneOre.h to CMakeLists.txt * Fixed silk touch pickaxe not dropping redstone ore (and dropping null item instead) --- src/Blocks/BlockOre.h | 7 ++++++- src/Blocks/CMakeLists.txt | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Blocks/BlockOre.h b/src/Blocks/BlockOre.h index 6200b09f4..46b18f008 100644 --- a/src/Blocks/BlockOre.h +++ b/src/Blocks/BlockOre.h @@ -27,7 +27,12 @@ public: // If using silk-touch, drop self rather than the resource: if (ToolHasSilkTouch(a_Tool)) { - return cItem(m_BlockType); + switch (m_BlockType) + { + // If it was a glowing redstone ore, drop a normal redstone ore + case E_BLOCK_REDSTONE_ORE_GLOWING: return cItem(E_BLOCK_REDSTONE_ORE); + default: return cItem(m_BlockType); + } } // TODO: Handle the Fortune enchantment here diff --git a/src/Blocks/CMakeLists.txt b/src/Blocks/CMakeLists.txt index 1026848df..87464bd04 100644 --- a/src/Blocks/CMakeLists.txt +++ b/src/Blocks/CMakeLists.txt @@ -72,6 +72,7 @@ target_sources( BlockRail.h BlockRedstone.h BlockRedstoneLamp.h + BlockRedstoneOre.h BlockRedstoneRepeater.h BlockRedstoneTorch.h BlockSand.h -- cgit v1.2.3