mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-01-30 23:05:03 +01:00
parent
9ce6f6f73f
commit
d4a854fb6e
2 changed files with 8 additions and 4 deletions
|
@ -309,7 +309,8 @@ public class DepotBehaviour extends BlockEntityBehaviour {
|
||||||
|
|
||||||
ItemStack returned = ItemStack.EMPTY;
|
ItemStack returned = ItemStack.EMPTY;
|
||||||
int maxCount = heldItem.stack.getMaxStackSize();
|
int maxCount = heldItem.stack.getMaxStackSize();
|
||||||
if (maxCount < heldItem.stack.getCount())
|
boolean stackTooLarge = maxCount < heldItem.stack.getCount();
|
||||||
|
if (stackTooLarge)
|
||||||
returned = ItemHandlerHelper.copyStackWithSize(heldItem.stack, heldItem.stack.getCount() - maxCount);
|
returned = ItemHandlerHelper.copyStackWithSize(heldItem.stack, heldItem.stack.getCount() - maxCount);
|
||||||
|
|
||||||
if (simulate)
|
if (simulate)
|
||||||
|
@ -323,8 +324,11 @@ public class DepotBehaviour extends BlockEntityBehaviour {
|
||||||
AllSoundEvents.DEPOT_PLOP.playOnServer(getWorld(), getPos());
|
AllSoundEvents.DEPOT_PLOP.playOnServer(getWorld(), getPos());
|
||||||
}
|
}
|
||||||
|
|
||||||
heldItem = heldItem.copy();
|
if (stackTooLarge) {
|
||||||
heldItem.stack.setCount(maxCount);
|
heldItem = heldItem.copy();
|
||||||
|
heldItem.stack.setCount(maxCount);
|
||||||
|
}
|
||||||
|
|
||||||
this.heldItem = heldItem;
|
this.heldItem = heldItem;
|
||||||
onHeldInserted.accept(heldItem.stack);
|
onHeldInserted.accept(heldItem.stack);
|
||||||
return returned;
|
return returned;
|
||||||
|
|
|
@ -380,7 +380,7 @@ public class BasinBlockEntity extends SmartBlockEntity implements IHaveGoggleInf
|
||||||
inserter = BlockEntityBehaviour.get(level, be.getBlockPos(), InvManipulationBehaviour.TYPE);
|
inserter = BlockEntityBehaviour.get(level, be.getBlockPos(), InvManipulationBehaviour.TYPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (filter.isRecipeFilter())
|
if (filter != null && filter.isRecipeFilter())
|
||||||
filter = null; // Do not test spout outputs against the recipe filter
|
filter = null; // Do not test spout outputs against the recipe filter
|
||||||
|
|
||||||
IItemHandler targetInv = be == null ? null
|
IItemHandler targetInv = be == null ? null
|
||||||
|
|
Loading…
Reference in a new issue