Package net.minecraft.nbt.visitors
Record Class FieldTree
java.lang.Object
java.lang.Record
net.minecraft.nbt.visitors.FieldTree
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for thedepthrecord component.The field for thefieldsToRecurserecord component.The field for theselectedFieldsrecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEntry(FieldSelector p_202539_) static FieldTreeintdepth()Returns the value of thedepthrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefieldsToRecurserecord component.final inthashCode()Returns a hash code value for this object.booleanisSelected(TagType<?> p_202536_, String p_202537_) Returns the value of theselectedFieldsrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
depth
private final int depthThe field for thedepthrecord component. -
selectedFields
The field for theselectedFieldsrecord component. -
fieldsToRecurse
The field for thefieldsToRecurserecord component.
-
-
Constructor Details
-
FieldTree
private FieldTree(int p_202527_) -
FieldTree
public FieldTree(int depth, Map<String, TagType<?>> selectedFields, Map<String, FieldTree> fieldsToRecurse) Creates an instance of aFieldTreerecord class.- Parameters:
depth- the value for thedepthrecord componentselectedFields- the value for theselectedFieldsrecord componentfieldsToRecurse- the value for thefieldsToRecurserecord component
-
-
Method Details
-
createRoot
-
addEntry
-
isSelected
-
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 '=='. -
depth
public int depth()Returns the value of thedepthrecord component.- Returns:
- the value of the
depthrecord component
-
selectedFields
Returns the value of theselectedFieldsrecord component.- Returns:
- the value of the
selectedFieldsrecord component
-
fieldsToRecurse
Returns the value of thefieldsToRecurserecord component.- Returns:
- the value of the
fieldsToRecurserecord component
-