Record Class ConfigurationScreen.ConfigurationSectionScreen.Element

java.lang.Object
java.lang.Record
net.neoforged.neoforge.client.gui.ConfigurationScreen.ConfigurationSectionScreen.Element
Enclosing class:
ConfigurationScreen.ConfigurationSectionScreen

public static record ConfigurationScreen.ConfigurationSectionScreen.Element(@Nullable net.minecraft.network.chat.Component name, @Nullable net.minecraft.network.chat.Component tooltip, @Nullable net.minecraft.client.gui.components.AbstractWidget widget, @Nullable net.minecraft.client.OptionInstance<?> option, boolean undoable) extends Record
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final @Nullable net.minecraft.network.chat.Component
    The field for the name record component.
    private final @Nullable net.minecraft.client.OptionInstance<?>
    The field for the option record component.
    private final @Nullable net.minecraft.network.chat.Component
    The field for the tooltip record component.
    private final boolean
    The field for the undoable record component.
    private final @Nullable net.minecraft.client.gui.components.AbstractWidget
    The field for the widget record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Element(@Nullable net.minecraft.network.chat.Component name, @Nullable net.minecraft.network.chat.Component tooltip, @Nullable net.minecraft.client.gui.components.AbstractWidget widget, @Nullable net.minecraft.client.OptionInstance<?> option, boolean undoable)
    Creates an instance of a Element record class.
    Element(@Nullable net.minecraft.network.chat.Component name, @Nullable net.minecraft.network.chat.Component tooltip, net.minecraft.client.gui.components.AbstractWidget widget)
     
    Element(@Nullable net.minecraft.network.chat.Component name, @Nullable net.minecraft.network.chat.Component tooltip, net.minecraft.client.gui.components.AbstractWidget widget, boolean undoable)
     
    Element(net.minecraft.network.chat.Component name, net.minecraft.network.chat.Component tooltip, net.minecraft.client.OptionInstance<?> option)
     
    Element(net.minecraft.network.chat.Component name, net.minecraft.network.chat.Component tooltip, net.minecraft.client.OptionInstance<?> option, boolean undoable)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable Object
    any()
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    net.minecraft.client.gui.components.AbstractWidget
    getWidget(net.minecraft.client.Options options)
     
    final int
    Returns a hash code value for this object.
    @Nullable net.minecraft.network.chat.Component
    Returns the value of the name record component.
    @Nullable net.minecraft.client.OptionInstance<?>
    Returns the value of the option record component.
    @Nullable net.minecraft.network.chat.Component
    Returns the value of the tooltip record component.
    final String
    Returns a string representation of this record class.
    boolean
    Returns the value of the undoable record component.
    @Nullable net.minecraft.client.gui.components.AbstractWidget
    Returns the value of the widget record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • name

      @Nullable private final @Nullable net.minecraft.network.chat.Component name
      The field for the name record component.
    • tooltip

      @Nullable private final @Nullable net.minecraft.network.chat.Component tooltip
      The field for the tooltip record component.
    • widget

      @Nullable private final @Nullable net.minecraft.client.gui.components.AbstractWidget widget
      The field for the widget record component.
    • option

      @Nullable private final @Nullable net.minecraft.client.OptionInstance<?> option
      The field for the option record component.
    • undoable

      private final boolean undoable
      The field for the undoable record component.
  • Constructor Details

    • Element

      @Internal public Element(@Nullable @Nullable net.minecraft.network.chat.Component name, @Nullable @Nullable net.minecraft.network.chat.Component tooltip, @Nullable @Nullable net.minecraft.client.gui.components.AbstractWidget widget, @Nullable @Nullable net.minecraft.client.OptionInstance<?> option, boolean undoable)
      Creates an instance of a Element record class.
      Parameters:
      name - the value for the name record component
      tooltip - the value for the tooltip record component
      widget - the value for the widget record component
      option - the value for the option record component
      undoable - the value for the undoable record component
    • Element

      public Element(@Nullable @Nullable net.minecraft.network.chat.Component name, @Nullable @Nullable net.minecraft.network.chat.Component tooltip, net.minecraft.client.gui.components.AbstractWidget widget)
    • Element

      public Element(@Nullable @Nullable net.minecraft.network.chat.Component name, @Nullable @Nullable net.minecraft.network.chat.Component tooltip, net.minecraft.client.gui.components.AbstractWidget widget, boolean undoable)
    • Element

      public Element(net.minecraft.network.chat.Component name, net.minecraft.network.chat.Component tooltip, net.minecraft.client.OptionInstance<?> option)
    • Element

      public Element(net.minecraft.network.chat.Component name, net.minecraft.network.chat.Component tooltip, net.minecraft.client.OptionInstance<?> option, boolean undoable)
  • Method Details

    • getWidget

      public net.minecraft.client.gui.components.AbstractWidget getWidget(net.minecraft.client.Options options)
    • any

      @Nullable public @Nullable Object any()
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • name

      @Nullable public @Nullable net.minecraft.network.chat.Component name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • tooltip

      @Nullable public @Nullable net.minecraft.network.chat.Component tooltip()
      Returns the value of the tooltip record component.
      Returns:
      the value of the tooltip record component
    • widget

      @Nullable public @Nullable net.minecraft.client.gui.components.AbstractWidget widget()
      Returns the value of the widget record component.
      Returns:
      the value of the widget record component
    • option

      @Nullable public @Nullable net.minecraft.client.OptionInstance<?> option()
      Returns the value of the option record component.
      Returns:
      the value of the option record component
    • undoable

      public boolean undoable()
      Returns the value of the undoable record component.
      Returns:
      the value of the undoable record component