Record Class SelectorPattern
java.lang.Object
java.lang.Record
net.minecraft.commands.arguments.selector.SelectorPattern
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<SelectorPattern> private final StringThe field for thepatternrecord component.private final EntitySelectorThe field for theresolvedrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionSelectorPattern(String pattern, EntitySelector resolved) Creates an instance of aSelectorPatternrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.static com.mojang.serialization.DataResult<SelectorPattern> pattern()Returns the value of thepatternrecord component.resolved()Returns the value of theresolvedrecord component.toString()Returns a string representation of this record class.
-
Field Details
-
pattern
The field for thepatternrecord component. -
resolved
The field for theresolvedrecord component. -
CODEC
-
-
Constructor Details
-
SelectorPattern
Creates an instance of aSelectorPatternrecord class.- Parameters:
pattern- the value for thepatternrecord componentresolved- the value for theresolvedrecord component
-
-
Method Details
-
parse
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. -
pattern
Returns the value of thepatternrecord component.- Returns:
- the value of the
patternrecord component
-
resolved
Returns the value of theresolvedrecord component.- Returns:
- the value of the
resolvedrecord component
-