Interface ChiseledBookshelf

All Superinterfaces:
BlockInventoryHolder, BlockState, InventoryHolder, Metadatable, PersistentDataHolder, TileState

public interface ChiseledBookshelf extends TileState, BlockInventoryHolder
Represents a captured state of a chiseled bookshelf.
  • Method Details

    • getLastInteractedSlot

      int getLastInteractedSlot()
      Gets the last interacted inventory slot.
      Returns:
      the last interacted slot
    • setLastInteractedSlot

      void setLastInteractedSlot(int lastInteractedSlot)
      Sets the last interacted inventory slot.
      Parameters:
      lastInteractedSlot - the new last interacted slot
    • getInventory

      Description copied from interface: InventoryHolder
      Get the object's inventory.
      Specified by:
      getInventory in interface InventoryHolder
      Returns:
      inventory
      See Also:
    • getSnapshotInventory

      Returns:
      snapshot inventory
      See Also:
    • getSlot

      int getSlot(@NotNull @NotNull Vector position)
      Gets the appropriate slot based on a vector relative to this block.
      Will return -1 if the given vector is not within the bounds of any slot.

      The supplied vector should only contain components with values between 0.0 and 1.0, inclusive.

      Parameters:
      position - a vector relative to this block
      Returns:
      the slot under the given vector or -1