Package net.minecraft.nbt.visitors
Record Class FieldTree
java.lang.Object
java.lang.Record
net.minecraft.nbt.visitors.FieldTree
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final intThe field for thedepthrecord component.The field for thefieldsToRecurserecord component.The field for theselectedFieldsrecord component.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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- 
depthprivate final int depthThe field for thedepthrecord component.
- 
selectedFieldsThe field for theselectedFieldsrecord component.
- 
fieldsToRecurseThe field for thefieldsToRecurserecord component.
 
- 
- 
Constructor Details- 
FieldTreeprivate FieldTree(int p_202527_) 
- 
FieldTreepublic FieldTree(int depth, Map<String, TagType<?>> selectedFields, Map<String, FieldTree> fieldsToRecurse) Creates an instance of aFieldTreerecord class.- Parameters:
- depth- the value for the- depthrecord component
- selectedFields- the value for the- selectedFieldsrecord component
- fieldsToRecurse- the value for the- fieldsToRecurserecord component
 
 
- 
- 
Method Details- 
createRoot
- 
addEntry
- 
isSelected
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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 '=='.
- 
depthpublic int depth()Returns the value of thedepthrecord component.- Returns:
- the value of the depthrecord component
 
- 
selectedFieldsReturns the value of theselectedFieldsrecord component.- Returns:
- the value of the selectedFieldsrecord component
 
- 
fieldsToRecurseReturns the value of thefieldsToRecurserecord component.- Returns:
- the value of the fieldsToRecurserecord component
 
 
-