mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-01-27 21:38:05 +01:00
The Dupe Chute
- Fixed a duplication bug involving belts and chutes #6210 #5781 #6686
This commit is contained in:
parent
75d337ba8c
commit
7bd602a33f
2 changed files with 8 additions and 4 deletions
|
@ -378,6 +378,8 @@ public class BeltInventory {
|
|||
float min = offset;
|
||||
float max = offset + 1;
|
||||
for (TransportedItemStack stack : items) {
|
||||
if (toRemove.contains(stack))
|
||||
continue;
|
||||
if (stack.beltPosition > max)
|
||||
continue;
|
||||
if (stack.beltPosition > min)
|
||||
|
|
|
@ -50,13 +50,15 @@ public class ItemHandlerBeltSegment implements IItemHandler {
|
|||
return ItemStack.EMPTY;
|
||||
|
||||
amount = Math.min(amount, transported.stack.getCount());
|
||||
ItemStack extracted = simulate ? transported.stack.copy().split(amount) : transported.stack.split(amount);
|
||||
ItemStack extracted = simulate ? transported.stack.copy()
|
||||
.split(amount) : transported.stack.split(amount);
|
||||
if (!simulate) {
|
||||
if (transported.stack.isEmpty())
|
||||
this.beltInventory.toRemove.add(transported);
|
||||
this.beltInventory.belt.setChanged();
|
||||
this.beltInventory.belt.sendData();
|
||||
beltInventory.toRemove.add(transported);
|
||||
else
|
||||
beltInventory.belt.notifyUpdate();
|
||||
}
|
||||
|
||||
return extracted;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue