Optimize updateUnlimitedItems (#995)

This commit is contained in:
boubou19 authored and GitHub committed 2026-08-07 19:05:01 +03:00
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