Package net.minecraft.nbt.visitors
Record Class FieldSelector
java.lang.Object
java.lang.Record
net.minecraft.nbt.visitors.FieldSelector
-
Field Summary
-
Constructor Summary
ConstructorDescriptionFieldSelector
(String p_202501_, String p_202502_, TagType<?> p_202503_, String p_202504_) FieldSelector
(String p_202506_, TagType<?> p_202507_, String p_202508_) FieldSelector
(List<String> path, TagType<?> type, String name) Creates an instance of aFieldSelector
record class.FieldSelector
(TagType<?> p_202514_, String p_202515_) -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.name()
Returns the value of thename
record component.path()
Returns the value of thepath
record component.final String
toString()
Returns a string representation of this record class.TagType<?>
type()
Returns the value of thetype
record component.
-
Field Details
-
path
The field for thepath
record component. -
type
The field for thetype
record component. -
name
The field for thename
record component.
-
-
Constructor Details
-
FieldSelector
-
FieldSelector
-
FieldSelector
-
FieldSelector
Creates an instance of aFieldSelector
record class.- Parameters:
path
- the value for thepath
record componenttype
- the value for thetype
record componentname
- the value for thename
record 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. All components in this record class are compared withObjects::equals(Object,Object)
. -
path
Returns the value of thepath
record component.- Returns:
- the value of the
path
record component
-
type
Returns the value of thetype
record component.- Returns:
- the value of the
type
record component
-
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-