Package net.minecraft.inventory
Interface SidedInventory
- 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 Summary
Modifier and Type Method Description 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.boolean
canInsert(int slot, ItemStack stack, Direction dir)
Determines whether the given stack can be inserted into this inventory at the specified slot position from the given direction.int[]
getAvailableSlots(Direction side)
Gets the available slot positions that are reachable from a given side.Methods inherited from interface net.minecraft.inventory.Inventory
canPlayerUse, containsAny, count, getMaxCountPerStack, getStack, isEmpty, isValid, markDirty, onClose, onOpen, removeStack, removeStack, setStack, size
-
Method Details
-
getAvailableSlots
Gets the available slot positions that are reachable from a given side. -
canInsert
Determines whether the given stack can be inserted into this inventory at the specified slot position from the given direction. -
canExtract
Determines whether the given stack can be removed from this inventory at the specified slot position from the given direction.
-