Package net.minecraft.client.gui.screen
Record Class Screen.SelectedElementNarrationData
java.lang.Object
java.lang.Record
net.minecraft.client.gui.screen.Screen.SelectedElementNarrationData
- Record Components:
selectable-index-selectType-
- Enclosing class:
Screen
@Environment(CLIENT)
public static record Screen.SelectedElementNarrationData(Selectable selectable, int index, Selectable.SelectionType selectType)
extends Record
- Mappings:
Namespace Name named net/minecraft/client/gui/screen/Screen$SelectedElementNarrationDataintermediary net/minecraft/class_437$class_6390official gmj$anamed selectableintermediary comp_4463official anamed indexintermediary comp_4464official bnamed selectTypeintermediary comp_4465official c
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for theindexrecord component.private final SelectableThe field for theselectablerecord component.private final Selectable.SelectionTypeThe field for theselectTyperecord component. -
Constructor Summary
ConstructorsConstructorDescriptionSelectedElementNarrationData(Selectable selectable, int index, Selectable.SelectionType selectType) Creates an instance of aSelectedElementNarrationDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intindex()Returns the value of theindexrecord component.Returns the value of theselectablerecord component.Returns the value of theselectTyperecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
selectable
The field for theselectablerecord component. -
index
private final int indexThe field for theindexrecord component. -
selectType
The field for theselectTyperecord component.
-
-
Constructor Details
-
SelectedElementNarrationData
public SelectedElementNarrationData(Selectable selectable, int index, Selectable.SelectionType selectType) Creates an instance of aSelectedElementNarrationDatarecord class.- Parameters:
selectable- the value for theselectablerecord componentindex- the value for theindexrecord componentselectType- the value for theselectTyperecord component
-
-
Method Details
-
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 '=='. -
selectable
Returns the value of theselectablerecord component.- Returns:
- the value of the
selectablerecord component
-
index
public int index()Returns the value of theindexrecord component.- Returns:
- the value of the
indexrecord component
-
selectType
Returns the value of theselectTyperecord component.- Returns:
- the value of the
selectTyperecord component
-