Interface SidedSlot
-
- All Superinterfaces:
Inventory
,Slot
,ValueContainer
public interface SidedSlot extends Slot
A slot which belongs to a particular side of a "sided" inventory.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.spongepowered.api.item.inventory.Inventory
Inventory.Builder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
canAccept(ItemStack stack, Direction from)
Gets whether this slot can accept the specified item from the specified direction.boolean
canGet(ItemStack stack, Direction from)
Gets whether automation can extract the specified item from the specified direction.boolean
offer(ItemStack stack, Direction from)
Attempts to insert the supplied stack into this inventory from the specified direction.-
Methods inherited from interface org.spongepowered.api.item.inventory.Inventory
asViewable, canFit, capacity, children, clear, contains, contains, containsAny, containsChild, containsInventory, freeCapacity, get, get, hasChildren, intersect, offer, offer, parent, peek, peekAt, poll, poll, pollFrom, pollFrom, query, query, query, query, query, query, root, set, slot, slots, totalQuantity, union
-
Methods inherited from interface org.spongepowered.api.item.inventory.Slot
set, viewedSlot
-
-
-
-
Method Detail
-
canAccept
boolean canAccept(ItemStack stack, Direction from)
Gets whether this slot can accept the specified item from the specified direction.- Parameters:
stack
- Stack to checkfrom
- Direction to check for insertion from- Returns:
- true if this inventory can accept the supplied stack from the specified direction
-
offer
boolean offer(ItemStack stack, Direction from)
Attempts to insert the supplied stack into this inventory from the specified direction.- Parameters:
stack
- Stack to insertfrom
- Direction to check for insertion from- Returns:
- true if this inventory can accept the supplied stack from the specified direction
- See Also:
Inventory.offer(ItemStack...)
-
canGet
boolean canGet(ItemStack stack, Direction from)
Gets whether automation can extract the specified item from the specified direction.- Parameters:
stack
- Stack to checkfrom
- Direction to check for retrieval from- Returns:
- true if automation can retrieve the supplied stack from the specified direction
-
-