Fix crash when transferring some modded items.

This commit is contained in:
Justin Aquadro committed 2014-09-07 14:30:01 -04:00
1 parent eaae3b4490
commit 0930cfd43e
1 file changed
+8 -4
@@ -80,6 +80,13 @@ public class TileEntityDrawers extends TileEntity implements ISidedInventory
return item.getItemStackLimit(protoStack) * stackCapacity();
}
public int stackSize () {
if (item == null)
return 0;
return item.getItemStackLimit(protoStack);
}
public int remainingCapacity () {
if (item == null)
return 0;
@@ -163,10 +170,7 @@ public class TileEntityDrawers extends TileEntity implements ISidedInventory
}
public int getStackSize (int slot) {
if (data[slot].getItem() == null)
return 0;
return data[slot].getItem().getItemStackLimit(null);
return data[slot].stackSize();
}
public ItemStack getSingleItemStack (int slot) {