From 53f600110740be79ea65d857911db70bb8ba9fcc Mon Sep 17 00:00:00 2001 From: haykam821 <24855774+haykam821@users.noreply.github.com> Date: Tue, 12 Dec 2023 22:39:40 -0500 Subject: [PATCH] Rename the NbtTagSizeTracker class to NbtSizeTracker --- mappings/net/minecraft/nbt/NbtIo.mapping | 20 +++++++++---------- ...Tracker.mapping => NbtSizeTracker.mapping} | 2 +- .../minecraft/network/PacketByteBuf.mapping | 12 +++++------ unpick-definitions/network.unpick | 2 +- 4 files changed, 18 insertions(+), 18 deletions(-) rename mappings/net/minecraft/nbt/{NbtTagSizeTracker.mapping => NbtSizeTracker.mapping} (92%) diff --git a/mappings/net/minecraft/nbt/NbtIo.mapping b/mappings/net/minecraft/nbt/NbtIo.mapping index 518ac52c4d..7e090b54db 100644 --- a/mappings/net/minecraft/nbt/NbtIo.mapping +++ b/mappings/net/minecraft/nbt/NbtIo.mapping @@ -1,7 +1,7 @@ CLASS net/minecraft/class_2507 net/minecraft/nbt/NbtIo COMMENT A set of utility functions for reading, writing, and scanning NBT files. - COMMENT Methods that do not require {@link NbtTagSizeTracker} accept any bytes of data, - COMMENT provided that its depth does not exceed {@value NbtTagSizeTracker#DEFAULT_MAX_DEPTH}. + COMMENT Methods that do not require {@link NbtSizeTracker} accept any bytes of data, + COMMENT provided that its depth does not exceed {@value NbtSizeTracker#DEFAULT_MAX_DEPTH}. COMMENT COMMENT
When {@linkplain DataOutput#writeUTF writing an invalid string}, methods in COMMENT this class will write an empty string instead of crashing, with the exception of @@ -41,7 +41,7 @@ CLASS net/minecraft/class_2507 net/minecraft/nbt/NbtIo COMMENT @throws IOException if the IO operation fails or if the root NBT element is COMMENT not a compound COMMENT @throws NbtSizeValidationException if the NBT is too deep - COMMENT @see #readCompressed(Path, NbtTagSizeTracker) + COMMENT @see #readCompressed(Path, NbtSizeTracker) ARG 0 stream ARG 1 tagSizeTracker METHOD method_10630 write (Lnet/minecraft/class_2487;Ljava/nio/file/Path;)V @@ -60,7 +60,7 @@ CLASS net/minecraft/class_2507 net/minecraft/nbt/NbtIo COMMENT method will throw an error, unlike other methods. COMMENT COMMENT @throws IOException if the IO operation fails - COMMENT @see #read(DataInput, NbtTagSizeTracker) + COMMENT @see #read(DataInput, NbtSizeTracker) COMMENT @see #writeForPacket(NbtElement, DataOutput) COMMENT @see #write(NbtElement, DataOutput) ARG 0 nbt @@ -87,7 +87,7 @@ CLASS net/minecraft/class_2507 net/minecraft/nbt/NbtIo COMMENT @throws IOException if the IO operation fails or if the root NBT element is COMMENT not a compound COMMENT @throws NbtSizeValidationException if the NBT is too deep - COMMENT @see #readCompressed(InputStream, NbtTagSizeTracker) + COMMENT @see #readCompressed(InputStream, NbtSizeTracker) ARG 0 path ARG 1 tagSizeTracker METHOD method_30614 writeCompressed (Lnet/minecraft/class_2487;Ljava/nio/file/Path;)V @@ -118,7 +118,7 @@ CLASS net/minecraft/class_2507 net/minecraft/nbt/NbtIo COMMENT COMMENT @throws IOException if the IO operation fails COMMENT @throws NbtSizeValidationException if the {@code tracker}'s validation fails - COMMENT @see #scanCompressed(InputStream, NbtScanner, NbtTagSizeTracker) + COMMENT @see #scanCompressed(InputStream, NbtScanner, NbtSizeTracker) ARG 0 path ARG 1 scanner ARG 2 tracker @@ -131,7 +131,7 @@ CLASS net/minecraft/class_2507 net/minecraft/nbt/NbtIo COMMENT COMMENT @throws IOException if the IO operation fails COMMENT @throws NbtSizeValidationException if the {@code tracker}'s validation fails - COMMENT @see #scanCompressed(Path, NbtScanner, NbtTagSizeTracker) + COMMENT @see #scanCompressed(Path, NbtScanner, NbtSizeTracker) ARG 0 stream ARG 1 scanner ARG 2 tracker @@ -148,13 +148,13 @@ CLASS net/minecraft/class_2507 net/minecraft/nbt/NbtIo COMMENT COMMENT @apiNote In vanilla, this is used exclusively in networking. COMMENT @throws IOException if the IO operation fails - COMMENT @see #read(DataInput, NbtTagSizeTracker) + COMMENT @see #read(DataInput, NbtSizeTracker) COMMENT @see #write(NbtElement, DataOutput) ARG 0 nbt ARG 1 output METHOD method_52894 read (Ljava/io/DataInput;Lnet/minecraft/class_2505;)Lnet/minecraft/class_2520; COMMENT Reads an NBT element from {@code input}. Unlike {@link - COMMENT #readCompound(DataInput, NbtTagSizeTracker)}, the element does not have to + COMMENT #readCompound(DataInput, NbtSizeTracker)}, the element does not have to COMMENT be a compound. COMMENT COMMENT @return the NBT element from the input @@ -174,7 +174,7 @@ CLASS net/minecraft/class_2507 net/minecraft/nbt/NbtIo COMMENT method will write an empty string instead of crashing. COMMENT COMMENT @throws IOException if the IO operation fails - COMMENT @see #read(DataInput, NbtTagSizeTracker) + COMMENT @see #read(DataInput, NbtSizeTracker) COMMENT @see #writeForPacket(NbtElement, DataOutput) COMMENT @see #writeUnsafe(NbtElement, DataOutput) ARG 0 nbt diff --git a/mappings/net/minecraft/nbt/NbtTagSizeTracker.mapping b/mappings/net/minecraft/nbt/NbtSizeTracker.mapping similarity index 92% rename from mappings/net/minecraft/nbt/NbtTagSizeTracker.mapping rename to mappings/net/minecraft/nbt/NbtSizeTracker.mapping index ad76e358ec..bb3ca632d6 100644 --- a/mappings/net/minecraft/nbt/NbtTagSizeTracker.mapping +++ b/mappings/net/minecraft/nbt/NbtSizeTracker.mapping @@ -1,4 +1,4 @@ -CLASS net/minecraft/class_2505 net/minecraft/nbt/NbtTagSizeTracker +CLASS net/minecraft/class_2505 net/minecraft/nbt/NbtSizeTracker COMMENT Tracks the size of NBT elements in bytes and in depth. Throws {@link COMMENT NbtSizeValidationException} if the tracked element becomes larger than {@link COMMENT #maxBytes} or if the depth exceeds {@link #maxDepth} during addition. diff --git a/mappings/net/minecraft/network/PacketByteBuf.mapping b/mappings/net/minecraft/network/PacketByteBuf.mapping index c4db57aae4..594e8a8deb 100644 --- a/mappings/net/minecraft/network/PacketByteBuf.mapping +++ b/mappings/net/minecraft/network/PacketByteBuf.mapping @@ -9,7 +9,7 @@ CLASS net/minecraft/class_2540 net/minecraft/network/PacketByteBuf COMMENT
Note that unlike {@link #readNbt(NbtTagSizeTracker)}, this can only + COMMENT
Note that unlike {@link #readNbt(NbtSizeTracker)}, this can only
COMMENT read compounds.
COMMENT
COMMENT @return the read compound, may be {@code null}
COMMENT @throws io.netty.handler.codec.EncoderException if the NBT cannot be read
COMMENT @throws net.minecraft.nbt.NbtSizeValidationException if the compound exceeds the allowed maximum size
COMMENT @see #writeNbt(NbtCompound)
- COMMENT @see #readNbt(NbtTagSizeTracker)
+ COMMENT @see #readNbt(NbtSizeTracker)
COMMENT @see #MAX_READ_NBT_SIZE
METHOD method_10799 readIntArray (I)[I
COMMENT Reads an array of primitive ints from this buf. The array first has a
@@ -494,7 +494,7 @@ CLASS net/minecraft/class_2540 net/minecraft/network/PacketByteBuf
COMMENT the pos to write
METHOD method_10808 readText ()Lnet/minecraft/class_2561;
COMMENT Reads a text from this buf. A text is represented as an NBT-encoded data
- COMMENT with {@linkplain NbtTagSizeTracker the maximum size} as {@value #MAX_READ_NBT_SIZE}.
+ COMMENT with {@linkplain NbtSizeTracker the maximum size} as {@value #MAX_READ_NBT_SIZE}.
COMMENT
COMMENT @return the read text
COMMENT @throws io.netty.handler.codec.EncoderException if the NBT cannot be read
@@ -647,7 +647,7 @@ CLASS net/minecraft/class_2540 net/minecraft/network/PacketByteBuf
COMMENT @param