Don't modify the out stack

Just in case, IDK
This commit is contained in:
abel1502 2025-05-23 01:08:27 +03:00
parent 81ca498fa8
commit d3e839a9bb
No known key found for this signature in database
GPG Key ID: 076926596A536338

View File

@ -85,7 +85,7 @@ public class TileEntityMachineStrandCaster extends TileEntityFoundryCastingBase
ItemStack out = mold.getOutput(type);
int remaining = out.stackSize * moldsToCast;
out.stackSize = out.getMaxStackSize();
final int maxStackSize = out.getMaxStackSize();
for (int i = 1; i < 7; i++) {
if (remaining <= 0) {
@ -97,7 +97,7 @@ public class TileEntityMachineStrandCaster extends TileEntityFoundryCastingBase
}
if (slots[i].isItemEqual(out)) {
int toDeposit = Math.min(remaining, out.stackSize - slots[i].stackSize);
int toDeposit = Math.min(remaining, maxStackSize - slots[i].stackSize);
slots[i].stackSize += toDeposit;
remaining -= toDeposit;
}