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
FieldsModifier and TypeFieldDescriptionprivate final @Nullable net.minecraft.network.chat.Component
The field for thename
record component.private final @Nullable net.minecraft.client.OptionInstance
<?> The field for theoption
record component.private final @Nullable net.minecraft.network.chat.Component
The field for thetooltip
record component.private final boolean
The field for theundoable
record component.private final @Nullable net.minecraft.client.gui.components.AbstractWidget
The field for thewidget
record component. -
Constructor Summary
ConstructorsConstructorDescriptionElement
(@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 aElement
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 TypeMethodDescription@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
hashCode()
Returns a hash code value for this object.@Nullable net.minecraft.network.chat.Component
name()
Returns the value of thename
record component.@Nullable net.minecraft.client.OptionInstance
<?> option()
Returns the value of theoption
record component.@Nullable net.minecraft.network.chat.Component
tooltip()
Returns the value of thetooltip
record component.final String
toString()
Returns a string representation of this record class.boolean
undoable()
Returns the value of theundoable
record component.@Nullable net.minecraft.client.gui.components.AbstractWidget
widget()
Returns the value of thewidget
record component.
-
Field Details
-
name
@Nullable private final @Nullable net.minecraft.network.chat.Component nameThe field for thename
record component. -
tooltip
@Nullable private final @Nullable net.minecraft.network.chat.Component tooltipThe field for thetooltip
record component. -
widget
@Nullable private final @Nullable net.minecraft.client.gui.components.AbstractWidget widgetThe field for thewidget
record component. -
option
@Nullable private final @Nullable net.minecraft.client.OptionInstance<?> optionThe field for theoption
record component. -
undoable
private final boolean undoableThe field for theundoable
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 aElement
record class.- Parameters:
name
- the value for thename
record componenttooltip
- the value for thetooltip
record componentwidget
- the value for thewidget
record componentoption
- the value for theoption
record componentundoable
- the value for theundoable
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
-
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. -
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. -
equals
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 withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
name
@Nullable public @Nullable net.minecraft.network.chat.Component name()Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
tooltip
@Nullable public @Nullable net.minecraft.network.chat.Component tooltip()Returns the value of thetooltip
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 thewidget
record component.- Returns:
- the value of the
widget
record component
-
option
@Nullable public @Nullable net.minecraft.client.OptionInstance<?> option()Returns the value of theoption
record component.- Returns:
- the value of the
option
record component
-
undoable
public boolean undoable()Returns the value of theundoable
record component.- Returns:
- the value of the
undoable
record component
-