Interface UnpackingHandler
- All Known Implementing Classes:
BasinUnpackingHandler,CrafterUnpackingHandler,DefaultUnpackingHandler,VoidingUnpackingHandler
@Experimental
public interface UnpackingHandler
Interface for custom handling of box unpacking into storage.
This interface is experimental as it is for a new feature. It may be revised or relocated, but will likely not change very much.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final UnpackingHandlerThe default unpacking handler, simply inserting all items into storage.static final SimpleRegistry<net.minecraft.world.level.block.Block, UnpackingHandler> -
Method Summary
Modifier and TypeMethodDescriptionbooleanunpack(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.Direction side, List<net.minecraft.world.item.ItemStack> items, @Nullable PackageOrderWithCrafts orderContext, boolean simulate) Unpack the given items into storage.
-
Field Details
-
REGISTRY
-
DEFAULT
The default unpacking handler, simply inserting all items into storage.
-
-
Method Details
-
unpack
boolean unpack(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.Direction side, List<net.minecraft.world.item.ItemStack> items, @Nullable @Nullable PackageOrderWithCrafts orderContext, boolean simulate) Unpack the given items into storage.- Parameters:
items- the list of non-empty item stacks to unpack. May be freely modifiedorderContext- the order context, if presentsimulate- true if the unpacking should only be simulated- Returns:
- true if all items have been unpacked successfully
-