mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-08-11 16:24:40 +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
|
public static int getItemLimit( IItemHandler inventory, int slot ) throws LuaException
|
||||||
{
|
{
|
||||||
assertBetween( slot, 1, inventory.getSlots(), "Slot out of range (%s)" );
|
assertBetween( slot, 1, inventory.getSlots(), "Slot out of range (%s)" );
|
||||||
return inventory.getSlotLimit( slot );
|
return inventory.getSlotLimit( slot - 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user