Interface Slot
- All Superinterfaces:
Inventory, ValueContainer
- All Known Subinterfaces:
CraftingOutput, EquipmentSlot, FilteringSlot, FuelSlot, InputSlot, OutputSlot, PotionSlot, SidedSlot
-
Nested Class Summary
Nested classes/interfaces inherited from interface Inventory
Inventory.Builder -
Method Summary
Modifier and TypeMethodDescriptionset(ItemStackLike stack) Adds the ItemStack to this slot overwriting the existing item.Returns the slot in aContainers viewed inventory or itself.Methods inherited from interface 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, unionMethods inherited from interface ValueContainer
getDouble, getInt, getKeys, getLong, getOrElse, getOrNull, getValue, getValues, require, requireValue, streamKeys, streamValues, supports, supports
-
Method Details
-
viewedSlot
-
set
Adds the ItemStack to this slot overwriting the existing item.Stacks bigger than the max stack size will be partially rejected.
- Parameters:
stack- The stack to add to this slot.- Returns:
- A SUCCESS transaction-result if the entire stack was added and FAILURE when the stack was not or only partially added to the inventory.
-