Record Class GuiPaintInputs

java.lang.Object
java.lang.Record
com.render.api.gui.paint.GuiPaintInputs
Record Components:
properties - named immutable values, at most 128
stateQueries - additional selector queries, at most 64

public record GuiPaintInputs(Map<String,Object> properties, Set<GuiStyleState> stateQueries) extends Record
Immutable declared worklet inputs for one retained component. Properties belong to that component rather than its descendants; nested paint commands preserve their owner's inputs. Values must themselves be immutable. Standard interaction flags and explicitly authored selector states are available without declaring queries. Additional queries allow a component's state providers to contribute custom or structural selector states.
  • Field Details

  • Constructor Details

    • GuiPaintInputs

      public GuiPaintInputs(Map<String,Object> properties, Set<GuiStyleState> stateQueries)
      Creates an instance of a GuiPaintInputs record class.
      Parameters:
      properties - the value for the properties record component
      stateQueries - the value for the stateQueries record component
  • Method Details

    • withProperty

      public GuiPaintInputs withProperty(String name, Object value)
      Declares a property without changing the original input snapshot.
    • withState

      public GuiPaintInputs withState(GuiStyleState state)
      Adds a selector-state query without changing the original input snapshot.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • properties

      public Map<String,Object> properties()
      Returns the value of the properties record component.
      Returns:
      the value of the properties record component
    • stateQueries

      public Set<GuiStyleState> stateQueries()
      Returns the value of the stateQueries record component.
      Returns:
      the value of the stateQueries record component