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 String
The field for thepattern
record component.private final EntitySelector
The field for theresolved
record component. -
Constructor Summary
ConstructorsConstructorDescriptionSelectorPattern
(String pattern, EntitySelector resolved) Creates an instance of aSelectorPattern
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicates whether some other object is "equal to" this one.int
hashCode()
Returns a hash code value for this object.static com.mojang.serialization.DataResult
<SelectorPattern> pattern()
Returns the value of thepattern
record component.resolved()
Returns the value of theresolved
record component.toString()
Returns a string representation of this record class.
-
Field Details
-
pattern
The field for thepattern
record component. -
resolved
The field for theresolved
record component. -
CODEC
-
-
Constructor Details
-
SelectorPattern
Creates an instance of aSelectorPattern
record class.- Parameters:
pattern
- the value for thepattern
record componentresolved
- the value for theresolved
record 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 thepattern
record component.- Returns:
- the value of the
pattern
record component
-
resolved
Returns the value of theresolved
record component.- Returns:
- the value of the
resolved
record component
-