mirror of
https://github.com/GTNewHorizons/StorageDrawers.git
synced 2026-11-22 05:02:12 +00:00
Fix crash when transferring some modded items.
This commit is contained in:
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) {
|
||||
|
||||
Reference in new issue
Block a user