mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-09-04 11:27:56 +00:00
Fix off-by-1 error in generic inventory's getItemLimit() (#1131)
This commit is contained in:
@@ -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 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user