mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-25 14:24:35 +00:00
Update to 1.11.2. Untested, still using outdated MCMP
This commit is contained in:
1 parent
2b02042f4c
commit
6a42eb64e3
666 files changed
+11360
-3713
No files matched your search
@@ -33,13 +33,13 @@ public final class InvStack
|
||||
|
||||
for(ItemStack stack : itemStacks)
|
||||
{
|
||||
size += stack.stackSize;
|
||||
size += stack.getCount();
|
||||
}
|
||||
|
||||
if(!itemStacks.isEmpty())
|
||||
{
|
||||
ItemStack ret = itemStacks.get(0).copy();
|
||||
ret.stackSize = size;
|
||||
ret.setCount(size);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -59,16 +59,16 @@ public final class InvStack
|
||||
{
|
||||
ItemStack stack = itemStacks.get(i);
|
||||
|
||||
if(inventory.getStackInSlot(slotIDs.get(i)).stackSize == stack.stackSize && stack.stackSize <= amount)
|
||||
if(inventory.getStackInSlot(slotIDs.get(i)).getCount() == stack.getCount() && stack.getCount() <= amount)
|
||||
{
|
||||
inventory.setInventorySlotContents(slotIDs.get(i), null);
|
||||
amount -= stack.stackSize;
|
||||
amount -= stack.getCount();
|
||||
}
|
||||
else {
|
||||
ItemStack ret = stack.copy();
|
||||
ret.stackSize = inventory.getStackInSlot(slotIDs.get(i)).stackSize - Math.min(stack.stackSize, amount);
|
||||
ret.setCount(inventory.getStackInSlot(slotIDs.get(i)).getCount() - Math.min(stack.getCount(), amount));
|
||||
inventory.setInventorySlotContents(slotIDs.get(i), ret);
|
||||
amount -= ret.stackSize;
|
||||
amount -= ret.getCount();
|
||||
}
|
||||
|
||||
if(amount == 0)
|
||||
@@ -80,6 +80,6 @@ public final class InvStack
|
||||
|
||||
public void use()
|
||||
{
|
||||
use(getStack().stackSize);
|
||||
use(getStack().getCount());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user