From e2c8b335c6a262d969ff0a23de4ea70a3a22f9ca Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Mon, 5 Dec 2016 15:27:01 +0100 Subject: [PATCH] Fix a crash with the Miner Closes #447 --- .../de/ellpeck/actuallyadditions/mod/tile/TileEntityMiner.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityMiner.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityMiner.java index 029604aa9..cb2bbb9a2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityMiner.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityMiner.java @@ -14,6 +14,7 @@ import de.ellpeck.actuallyadditions.mod.config.values.ConfigStringListValues; import de.ellpeck.actuallyadditions.mod.items.ItemDrill; import de.ellpeck.actuallyadditions.mod.network.gui.IButtonReactor; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; +import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.block.Block; import net.minecraft.block.BlockLiquid; @@ -137,7 +138,7 @@ public class TileEntityMiner extends TileEntityInventoryBase implements IButtonR } else{ ItemStack stack = new ItemStack(block, 1, meta); - if(stack.getItem() != null){ + if(StackUtil.isValid(stack)){ int[] ids = OreDictionary.getOreIDs(stack); for(int id : ids){ String name = OreDictionary.getOreName(id);