Package net.minecraft.nbt.scanner
Record Class NbtTreeNode
java.lang.Object
java.lang.Record
net.minecraft.nbt.scanner.NbtTreeNode
- Record Components:
- depth- the depth of the node, starting from- 1
- selectedFields- the keys to select ("leaves")
- fieldsToRecurse- The keys to check recursively ("branches")
public record NbtTreeNode(int depth, Map<String,NbtType<?>> selectedFields, Map<String,NbtTreeNode> fieldsToRecurse)
extends Record  
The tree node for representing NBT.
- Mappings:
- Namespace - Name - official - ru- intermediary - net/minecraft/class_6842- named - net/minecraft/nbt/scanner/NbtTreeNode- official - a- intermediary - comp_315- named - depth- official - b- intermediary - comp_323- named - selectedFields- official - c- intermediary - comp_317- named - fieldsToRecurse
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final intThe field for thedepthrecord component.private final Map<String,NbtTreeNode> The field for thefieldsToRecurserecord component.The field for theselectedFieldsrecord component.
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprivateNbtTreeNode(int depth) NbtTreeNode(int int2, Map<String, NbtType<?>> map, Map<String, NbtTreeNode> map2) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidadd(NbtScanQuery query) static NbtTreeNodeReturns the root node.intdepth()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.booleanisTypeEqual(NbtType<?> type, String key) Returns whether the queried type for the keykeymatchestype.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- 
NbtTreeNodeprivate NbtTreeNode(int depth) - Mappings:
- Namespace - Name - Mixin selector - official - <init>- Lru;<init>(I)V- intermediary - <init>- Lnet/minecraft/class_6842;<init>(I)V- named - <init>- Lnet/minecraft/nbt/scanner/NbtTreeNode;<init>(I)V
 
- 
NbtTreeNode
 
- 
- 
Method Details- 
createRootReturns the root node.- Returns:
- the root node
- Implementation Note:
- The root node has the depth of 1.
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lru;a()Lru;- intermediary - method_40060- Lnet/minecraft/class_6842;method_40060()Lnet/minecraft/class_6842;- named - createRoot- Lnet/minecraft/nbt/scanner/NbtTreeNode;createRoot()Lnet/minecraft/nbt/scanner/NbtTreeNode;
 
- 
add- Mappings:
- Namespace - Name - Mixin selector - official - a- Lru;a(Lrt;)V- intermediary - method_39881- Lnet/minecraft/class_6842;method_39881(Lnet/minecraft/class_6843;)V- named - add- Lnet/minecraft/nbt/scanner/NbtTreeNode;add(Lnet/minecraft/nbt/scanner/NbtScanQuery;)V
 
- 
isTypeEqualReturns whether the queried type for the keykeymatchestype.- Returns:
- whether the queried type for the key keymatchestype
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lru;a(Lrm;Ljava/lang/String;)Z- intermediary - method_40061- Lnet/minecraft/class_6842;method_40061(Lnet/minecraft/class_4614;Ljava/lang/String;)Z- named - isTypeEqual- Lnet/minecraft/nbt/scanner/NbtTreeNode;isTypeEqual(Lnet/minecraft/nbt/NbtType;Ljava/lang/String;)Z
 
- 
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
 
 
-