mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-01-14 11:15:43 +00:00
Fix off-by-1 error in generic inventory's getItemLimit() (#1131)
This commit is contained in:
parent
be3a960273
commit
4cfd0a2d1c
@ -166,7 +166,7 @@ public class InventoryMethods implements GenericPeripheral
|
||||
public static int getItemLimit( IItemHandler inventory, int slot ) throws LuaException
|
||||
{
|
||||
assertBetween( slot, 1, inventory.getSlots(), "Slot out of range (%s)" );
|
||||
return inventory.getSlotLimit( slot );
|
||||
return inventory.getSlotLimit( slot - 1 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user