mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-10 12:33:57 +01:00
parent
9ce6f6f73f
commit
d4a854fb6e
@ -309,7 +309,8 @@ public class DepotBehaviour extends BlockEntityBehaviour {
|
||||
|
||||
ItemStack returned = ItemStack.EMPTY;
|
||||
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);
|
||||
|
||||
if (simulate)
|
||||
@ -323,8 +324,11 @@ public class DepotBehaviour extends BlockEntityBehaviour {
|
||||
AllSoundEvents.DEPOT_PLOP.playOnServer(getWorld(), getPos());
|
||||
}
|
||||
|
||||
heldItem = heldItem.copy();
|
||||
heldItem.stack.setCount(maxCount);
|
||||
if (stackTooLarge) {
|
||||
heldItem = heldItem.copy();
|
||||
heldItem.stack.setCount(maxCount);
|
||||
}
|
||||
|
||||
this.heldItem = heldItem;
|
||||
onHeldInserted.accept(heldItem.stack);
|
||||
return returned;
|
||||
|
@ -380,7 +380,7 @@ public class BasinBlockEntity extends SmartBlockEntity implements IHaveGoggleInf
|
||||
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
|
||||
|
||||
IItemHandler targetInv = be == null ? null
|
||||
|
Loading…
Reference in New Issue
Block a user