Interface ChiseledBookshelf

All Superinterfaces:
BlockData, Cloneable, Directional

public interface ChiseledBookshelf extends Directional
Interface to the 'slot_0_occupied', 'slow_1_occupied' ... 'slot_5_occupied' flags on a bookshelf which indicate which slots are occupied rendered on the outside.
Block may have 0, 1... getMaximumOccupiedSlots()-1 occupied slots.
  • Method Details

    • isSlotOccupied

      boolean isSlotOccupied(int slot)
      Checks if the following slot is occupied.
      Parameters:
      slot - to check
      Returns:
      if slot is occupied
    • setSlotOccupied

      void setSlotOccupied(int slot, boolean occupied)
      Sets whether the following slot is occupied.
      Parameters:
      slot - to set
      occupied - book
    • getOccupiedSlots

      @NotNull Set<Integer> getOccupiedSlots()
      Get the indexes of all the occupied slots present on this block.
      Returns:
      set of all occupied slots
    • getMaximumOccupiedSlots

      int getMaximumOccupiedSlots()
      Get the maximum amount of slots on this block.
      Returns:
      maximum occupied slots count