Class NbtTagSizeTracker

java.lang.Object
net.minecraft.nbt.NbtTagSizeTracker

public class NbtTagSizeTracker extends Object
Tracks the size of NBT elements. Throws RuntimeException if the tracked element becomes larger than maxBytes during addition.
Mappings:
Namespace Name
official ra
intermediary net/minecraft/class_2505
named net/minecraft/nbt/NbtTagSizeTracker
  • Field Details

    • EMPTY

      public static final NbtTagSizeTracker EMPTY
      Mappings:
      Namespace Name Mixin selector
      official a Lra;a:Lra;
      intermediary field_11556 Lnet/minecraft/class_2505;field_11556:Lnet/minecraft/class_2505;
      named EMPTY Lnet/minecraft/nbt/NbtTagSizeTracker;EMPTY:Lnet/minecraft/nbt/NbtTagSizeTracker;
    • maxBytes

      private final long maxBytes
      Mappings:
      Namespace Name Mixin selector
      official b Lra;b:J
      intermediary field_11557 Lnet/minecraft/class_2505;field_11557:J
      named maxBytes Lnet/minecraft/nbt/NbtTagSizeTracker;maxBytes:J
    • allocatedBytes

      private long allocatedBytes
      Mappings:
      Namespace Name Mixin selector
      official c Lra;c:J
      intermediary field_11555 Lnet/minecraft/class_2505;field_11555:J
      named allocatedBytes Lnet/minecraft/nbt/NbtTagSizeTracker;allocatedBytes:J
  • Constructor Details

    • NbtTagSizeTracker

      public NbtTagSizeTracker(long maxBytes)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lra;<init>(J)V
      intermediary <init> Lnet/minecraft/class_2505;<init>(J)V
      named <init> Lnet/minecraft/nbt/NbtTagSizeTracker;<init>(J)V
  • Method Details

    • add

      public void add(long bytes)
      Mappings:
      Namespace Name Mixin selector
      official a Lra;a(J)V
      intermediary method_48004 Lnet/minecraft/class_2505;method_48004(J)V
      named add Lnet/minecraft/nbt/NbtTagSizeTracker;add(J)V
    • getAllocatedBytes

      public long getAllocatedBytes()
      Mappings:
      Namespace Name Mixin selector
      official a Lra;a()J
      intermediary method_47987 Lnet/minecraft/class_2505;method_47987()J
      named getAllocatedBytes Lnet/minecraft/nbt/NbtTagSizeTracker;getAllocatedBytes()J