diff --git a/CHANGELOG.md b/CHANGELOG.md index de7f3ad2e..415178c81 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Fixed buggy reequip animation on wireless grid - Fixed solderer not supporting ore dictionary - Fixed recipes not supporting ore dictionary +- Fixed destructor not being able to destroy some blocks **Features** - Added the Stack Upgrade diff --git a/src/main/java/refinedstorage/tile/TileDestructor.java b/src/main/java/refinedstorage/tile/TileDestructor.java index 9c90172ea..850bed611 100755 --- a/src/main/java/refinedstorage/tile/TileDestructor.java +++ b/src/main/java/refinedstorage/tile/TileDestructor.java @@ -5,7 +5,6 @@ import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.inventory.Container; import net.minecraft.inventory.InventoryHelper; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumFacing; @@ -53,11 +52,11 @@ public class TileDestructor extends TileMachine implements ICompareConfig, IMode BlockPos front = pos.offset(getDirection()); IBlockState frontBlockState = worldObj.getBlockState(front); - Block frontBlock = frontBlockState.getBlock(); + ItemStack frontStack = frontBlockState.getBlock().getItem(worldObj, front, frontBlockState); - if (Item.getItemFromBlock(frontBlock) != null && !frontBlock.isAir(frontBlockState, worldObj, front)) { - if (ModeFilter.respectsMode(filters, this, compare, new ItemStack(frontBlock, 1, frontBlock.getMetaFromState(frontBlockState)))) { - List drops = frontBlock.getDrops(worldObj, front, frontBlockState, 0); + if (frontStack != null) { + if (ModeFilter.respectsMode(filters, this, compare, frontStack)) { + List drops = frontBlockState.getBlock().getDrops(worldObj, front, frontBlockState, 0); worldObj.playEvent(null, 2001, front, Block.getStateId(frontBlockState)); worldObj.setBlockToAir(front);