Interface SidedInventory

All Superinterfaces:
Clearable, Inventory
All Known Implementing Classes:
AbstractFurnaceBlockEntity, BlastFurnaceBlockEntity, BrewingStandBlockEntity, ComposterBlock.ComposterInventory, ComposterBlock.DummyInventory, ComposterBlock.FullComposterInventory, FurnaceBlockEntity, ShulkerBoxBlockEntity, SmokerBlockEntity

public interface SidedInventory
extends Inventory
A special inventory interface for inventories that expose different slots for different sides, such as hoppers.
  • Method Details

    • getAvailableSlots

      int[] getAvailableSlots​(Direction side)
      Gets the available slot positions that are reachable from a given side.
    • canInsert

      boolean canInsert​(int slot, ItemStack stack, @Nullable Direction dir)
      Determines whether the given stack can be inserted into this inventory at the specified slot position from the given direction.
    • canExtract

      boolean canExtract​(int slot, ItemStack stack, Direction dir)
      Determines whether the given stack can be removed from this inventory at the specified slot position from the given direction.