Fix Tool Station allowing to rename anything #1211

This commit is contained in:
Bernhard Bonigl committed 2014-12-03 21:30:15 +01:00
1 parent 791fe9494f
commit 855b58f01b
1 file changed
+3 -2
@@ -8,6 +8,7 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import tconstruct.library.crafting.*;
import tconstruct.library.modifier.IModifyable;
import tconstruct.library.tools.ToolCore;
import tconstruct.tools.inventory.ToolStationContainer;
/* Simple class for storing items in the block
@@ -117,8 +118,8 @@ public class ToolStationLogic extends InventoryLogic implements ISidedInventory
else
temp = inventory[1].copy();
if (temp == null)
return null; // output as well as inventory is null :(
if (temp == null || !(temp.getItem() instanceof ToolCore))
return null; // output as well as inventory is null or not a tool :(
NBTTagCompound tags = temp.getTagCompound();
if (tags == null)