Package net.minecraft.nbt
Class NbtSizeTracker
java.lang.Object
net.minecraft.nbt.NbtSizeTracker
Tracks the size of NBT elements in bytes and in depth. Throws
NbtSizeValidationException
if the tracked element becomes larger than maxBytes
or if the depth exceeds maxDepth
during addition.- Mappings:
Namespace Name official sw
intermediary net/minecraft/class_2505
named net/minecraft/nbt/NbtSizeTracker
-
Field Summary
Modifier and TypeFieldDescriptionprivate long
private static final int
private int
private final long
private final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(long bytes) void
add
(long multiplier, long bytes) long
int
getDepth()
static NbtSizeTracker
of
(long maxBytes) static NbtSizeTracker
void
popStack()
void
-
Field Details
-
DEFAULT_MAX_DEPTH
private static final int DEFAULT_MAX_DEPTH- See Also:
- Mappings:
Namespace Name Mixin selector official a
Lsw;a:I
intermediary field_46208
Lnet/minecraft/class_2505;field_46208:I
named DEFAULT_MAX_DEPTH
Lnet/minecraft/nbt/NbtSizeTracker;DEFAULT_MAX_DEPTH:I
-
maxBytes
private final long maxBytes- Mappings:
Namespace Name Mixin selector official b
Lsw;b:J
intermediary field_11557
Lnet/minecraft/class_2505;field_11557:J
named maxBytes
Lnet/minecraft/nbt/NbtSizeTracker;maxBytes:J
-
allocatedBytes
private long allocatedBytes- Mappings:
Namespace Name Mixin selector official c
Lsw;c:J
intermediary field_11555
Lnet/minecraft/class_2505;field_11555:J
named allocatedBytes
Lnet/minecraft/nbt/NbtSizeTracker;allocatedBytes:J
-
maxDepth
private final int maxDepth- Mappings:
Namespace Name Mixin selector official d
Lsw;d:I
intermediary field_46209
Lnet/minecraft/class_2505;field_46209:I
named maxDepth
Lnet/minecraft/nbt/NbtSizeTracker;maxDepth:I
-
depth
private int depth- Mappings:
Namespace Name Mixin selector official e
Lsw;e:I
intermediary field_46210
Lnet/minecraft/class_2505;field_46210:I
named depth
Lnet/minecraft/nbt/NbtSizeTracker;depth:I
-
-
Constructor Details
-
NbtSizeTracker
public NbtSizeTracker(long maxBytes, int maxDepth) - Mappings:
Namespace Name Mixin selector official <init>
Lsw;<init>(JI)V
intermediary <init>
Lnet/minecraft/class_2505;<init>(JI)V
named <init>
Lnet/minecraft/nbt/NbtSizeTracker;<init>(JI)V
-
-
Method Details
-
of
- Mappings:
Namespace Name Mixin selector official a
Lsw;a(J)Lsw;
intermediary method_53899
Lnet/minecraft/class_2505;method_53899(J)Lnet/minecraft/class_2505;
named of
Lnet/minecraft/nbt/NbtSizeTracker;of(J)Lnet/minecraft/nbt/NbtSizeTracker;
-
ofUnlimitedBytes
- Mappings:
Namespace Name Mixin selector official a
Lsw;a()Lsw;
intermediary method_53898
Lnet/minecraft/class_2505;method_53898()Lnet/minecraft/class_2505;
named ofUnlimitedBytes
Lnet/minecraft/nbt/NbtSizeTracker;ofUnlimitedBytes()Lnet/minecraft/nbt/NbtSizeTracker;
-
add
public void add(long multiplier, long bytes) - Mappings:
Namespace Name Mixin selector official a
Lsw;a(JJ)V
intermediary method_53908
Lnet/minecraft/class_2505;method_53908(JJ)V
named add
Lnet/minecraft/nbt/NbtSizeTracker;add(JJ)V
-
add
public void add(long bytes) - Mappings:
Namespace Name Mixin selector official b
Lsw;b(J)V
intermediary method_48004
Lnet/minecraft/class_2505;method_48004(J)V
named add
Lnet/minecraft/nbt/NbtSizeTracker;add(J)V
-
pushStack
public void pushStack()- Mappings:
Namespace Name Mixin selector official b
Lsw;b()V
intermediary method_53900
Lnet/minecraft/class_2505;method_53900()V
named pushStack
Lnet/minecraft/nbt/NbtSizeTracker;pushStack()V
-
popStack
public void popStack()- Mappings:
Namespace Name Mixin selector official c
Lsw;c()V
intermediary method_53901
Lnet/minecraft/class_2505;method_53901()V
named popStack
Lnet/minecraft/nbt/NbtSizeTracker;popStack()V
-
getAllocatedBytes
public long getAllocatedBytes()- Mappings:
Namespace Name Mixin selector official d
Lsw;d()J
intermediary method_47987
Lnet/minecraft/class_2505;method_47987()J
named getAllocatedBytes
Lnet/minecraft/nbt/NbtSizeTracker;getAllocatedBytes()J
-
getDepth
public int getDepth()- Mappings:
Namespace Name Mixin selector official e
Lsw;e()I
intermediary method_53902
Lnet/minecraft/class_2505;method_53902()I
named getDepth
Lnet/minecraft/nbt/NbtSizeTracker;getDepth()I
-