1
0
Fork 0

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)
This commit is contained in:
KingCol13 2020-09-19 07:59:21 +01:00 committed by GitHub
parent e2e78abdb7
commit 272a8029e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -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

View File

@ -72,6 +72,7 @@ target_sources(
BlockRail.h
BlockRedstone.h
BlockRedstoneLamp.h
BlockRedstoneOre.h
BlockRedstoneRepeater.h
BlockRedstoneTorch.h
BlockSand.h