Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -374,16 +374,19 @@ public boolean unwrapBox(ItemStack box, TransactionContext ctx) {
// note: handler may modify the passed items
boolean unpacked = toUse.unpack(level, target, targetState, facing, items, orderContext, ctx);

// Only proceed if unpacking was successful (all items were placed)
if (unpacked) {
TransactionCallback.onSuccess(ctx, () -> {
previouslyUnwrapped = box;
animationInward = true;
animationTicks = CYCLE;
notifyUpdate();
});
return true;
} else {
// Unpacking failed, return false to prevent the package from being consumed
return false;
}

return true;
}

public void attemptToSend(List<PackagingRequest> queuedRequests) {
Expand Down