mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-13 17:04:03 +00:00
Optimize updateUnlimitedItems (#995)
This commit is contained in:
1 parent
139ca22e51
commit
a51836fe9b
2 files changed
+25
-23
No files matched your search
@@ -30,14 +30,7 @@ public class InfiniteStackSizeHandler implements IInfiniteItemHandler {
|
||||
|
||||
@Override
|
||||
public void replenishInfiniteStack(InventoryPlayer inv, int slotNo) {
|
||||
ItemStack stack = inv.getStackInSlot(slotNo);
|
||||
stack.stackSize = 111;
|
||||
|
||||
for (int i = 0; i < inv.getSizeInventory(); i++) {
|
||||
if (i == slotNo) continue;
|
||||
|
||||
if (NEIServerUtils.areStacksSameType(stack, inv.getStackInSlot(i))) inv.setInventorySlotContents(i, null);
|
||||
}
|
||||
inv.getStackInSlot(slotNo).stackSize = 111;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user