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 field) 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<?> type, String id) 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
-
fieldsToRecurse
-
-
Constructor Details
-
FieldTree
private FieldTree(int depth) -
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
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
depth
public int depth()Returns the value of thedepthrecord component.- Returns:
- the value of the
depthrecord component
-
selectedFields
-
fieldsToRecurse
-