Enum Class ScribeSlot

java.lang.Object
java.lang.Enum<ScribeSlot>
johnsmith.enchantingoverhauled.menu.scribe.model.ScribeSlot
All Implemented Interfaces:
Serializable, Comparable<ScribeSlot>, Constable

public enum ScribeSlot extends Enum<ScribeSlot>
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
     
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static net.minecraft.world.inventory.Slot
    create(ScribeSlot slotType, net.minecraft.world.Container container, ScribeGridData gridData)
    Generates a new inventory slot tailored with specific placement and stacking rules according to its designated slot type.
    int
    Retrieves the backend container index associated with this slot.
    static ScribeSlot
    Returns the enum constant of this class with the specified name.
    static ScribeSlot[]
    Returns an array containing the constants of this enum class, in the order they are declared.
    int
    x()
    Retrieves the visual X coordinate for the slot within the UI screen.
    int
    y()
    Retrieves the visual Y coordinate for the slot within the UI screen.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

  • Method Details

    • values

      public static ScribeSlot[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ScribeSlot valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • index

      public int index()
      Retrieves the backend container index associated with this slot.
      Returns:
      The slot integer index.
    • x

      public int x()
      Retrieves the visual X coordinate for the slot within the UI screen.
      Returns:
      The X coordinate in pixels.
    • y

      public int y()
      Retrieves the visual Y coordinate for the slot within the UI screen.
      Returns:
      The Y coordinate in pixels.
    • create

      public static net.minecraft.world.inventory.Slot create(ScribeSlot slotType, net.minecraft.world.Container container, ScribeGridData gridData)
      Generates a new inventory slot tailored with specific placement and stacking rules according to its designated slot type.
      Parameters:
      slotType - The enum classification defining the slot's index, coordinates, and rules.
      container - The underlying inventory container the slot will interact with.
      Returns:
      A newly constructed Slot implementation.