Package net.minecraft.nbt.visitors
Record Class FieldSelector
java.lang.Object
java.lang.Record
net.minecraft.nbt.visitors.FieldSelector
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFieldSelector(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 aFieldSelectorrecord class.FieldSelector(TagType<?> p_202514_, String p_202515_) -
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.name()Returns the value of thenamerecord component.path()Returns the value of thepathrecord component.final StringtoString()Returns a string representation of this record class.TagType<?> type()Returns the value of thetyperecord component.
-
Field Details
-
path
The field for thepathrecord component. -
type
The field for thetyperecord component. -
name
The field for thenamerecord component.
-
-
Constructor Details
-
FieldSelector
-
FieldSelector
-
FieldSelector
-
FieldSelector
Creates an instance of aFieldSelectorrecord class.- Parameters:
path- the value for thepathrecord componenttype- the value for thetyperecord componentname- the value for thenamerecord 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 thepathrecord component.- Returns:
- the value of the
pathrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-