public interface Inventory2D extends OrderedInventory
Inventory.Builder| Modifier and Type | Method and Description |
|---|---|
Optional<Slot> |
getSlot(SlotPos pos)
Gets the
Slot at the specified position. |
Optional<ItemStack> |
peek(SlotPos pos)
Gets without removing the stack at the supplied position in this
Inventory.
|
Optional<ItemStack> |
peek(SlotPos pos,
int limit)
Gets without removing the stack at the supplied position in this
Inventory.
|
Optional<ItemStack> |
poll(SlotPos pos)
Gets and remove the stack at the supplied position in this Inventory.
|
Optional<ItemStack> |
poll(SlotPos pos,
int limit)
Gets and remove the stack at the supplied position in this Inventory.
|
InventoryTransactionResult |
set(SlotPos pos,
ItemStack stack)
Sets the item in the specified slot.
|
getSlot, peek, peek, poll, poll, setbuilder, canFit, capacity, clear, contains, contains, containsAny, containsInventory, first, getArchetype, getInventoryProperty, getInventoryProperty, getMaxStackSize, getPlugin, getProperties, getProperties, getProperty, getProperty, hasChildren, intersect, next, offer, parent, peek, peek, poll, poll, query, query, query, query, query, query, query, queryAny, root, set, setMaxStackSize, size, slots, totalItems, transform, unionforEach, iterator, spliteratorOptional<ItemStack> poll(SlotPos pos)
pos - Slot position to queryInventory.poll()Inventory.poll()Optional<ItemStack> poll(SlotPos pos, int limit)
pos - Slot position to querylimit - item limitInventory.poll()Inventory.poll()Optional<ItemStack> peek(SlotPos pos)
pos - Slot position to queryInventory.peek()Inventory.peek()Optional<ItemStack> peek(SlotPos pos, int limit)
pos - Slot position to querylimit - item limitInventory.peek()Inventory.peek()InventoryTransactionResult set(SlotPos pos, ItemStack stack)
pos - Slot position to setstack - Stack to insertInventory.set(org.spongepowered.api.item.inventory.ItemStack)Inventory.set(ItemStack)Optional<Slot> getSlot(SlotPos pos)
Slot at the specified position.pos - Slot position to retrieveOptional.empty() if
no matching slot