mirror of
https://github.com/Ellpeck/PrettyPipes.git
synced 2024-11-26 05:28:33 +01:00
fixed a crafting terminal overflow if the crafting slots are full
This commit is contained in:
parent
c1100b02fe
commit
a53e0cf5d5
1 changed files with 4 additions and 1 deletions
|
@ -177,7 +177,10 @@ public class CraftingTerminalTileEntity extends ItemTerminalTileEntity {
|
||||||
if (lowestSlot >= 0) {
|
if (lowestSlot >= 0) {
|
||||||
ItemStack copy = remain.copy();
|
ItemStack copy = remain.copy();
|
||||||
copy.setCount(1);
|
copy.setCount(1);
|
||||||
remain.shrink(1 - tile.craftItems.insertItem(lowestSlot, copy, simulate).getCount());
|
// if there were remaining items inserting into the slot with lowest contents, we're overflowing
|
||||||
|
if (tile.craftItems.insertItem(lowestSlot, copy, simulate).getCount() > 0)
|
||||||
|
break;
|
||||||
|
remain.shrink(1);
|
||||||
if (remain.isEmpty())
|
if (remain.isEmpty())
|
||||||
return ItemStack.EMPTY;
|
return ItemStack.EMPTY;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue