Fixed crash when trans stone is used in its own crafting interface. I.e. using an MS with dirt in the MS' crafting interface caused a null reference.

This commit is contained in:
pure42 2012-07-08 17:21:34 +02:00
parent 68c5051d50
commit 070cffaeb2

View file

@ -14,7 +14,10 @@ public class CraftingHandler implements ICraftingHandler {
@Override
public void onTakenFromCrafting(EntityPlayer player, ItemStack stack, IInventory craftMatrix) {
if (mod_EE3.proxy.isPortableCraftingGUIOpen()) {
player.inventory.getCurrentItem().damageItem(1, player);
ItemStack currentInventoryItem = player.inventory.getCurrentItem();
if (currentInventoryItem != null) {
player.inventory.getCurrentItem().damageItem(1, player);
}
}
ItemStack currentItemStack;