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

    Fields
    Modifier and Type
    Field
    Description
    static final UnpackingHandler
    The default unpacking handler, simply inserting all items into storage.
    static final SimpleRegistry<net.minecraft.world.level.block.Block,UnpackingHandler>
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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 PackageOrder order, boolean simulate)
    Unpack the given items into storage.
  • Field Details

  • 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 PackageOrder order, boolean simulate)
      Unpack the given items into storage.
      Parameters:
      items - the list of non-empty item stacks to unpack. May be freely modified
      order - the order context, if present
      simulate - true if the unpacking should only be simulated
      Returns:
      true if all items have been unpacked successfully