Mojira Archive
MC-258210

NBT sizes are calculated inconsistently

The bug

Since 1.19.3 Pre-release 3, a finite upper limit has been added to the NBT size. This limit is 2097152 bits in one place and 2097152 bytes in another. This is probably unintentional, and either one is correct. (It seems that bytes are correct, considering that the limit comes from the max NBT size of FriendlyByteBuf.)

Code analysis

In net.minecraft.commands.arguments.NbtPathArgument#set and net.minecraft.commands.arguments.NbtPathArgument#insert, NBT sizes are calculated in bits by sizeInBits. On the other hand, in net.minecraft.server.commands.data.DataCommands#register and net.minecraft.server.commands.data.DataCommands#mergeData, NBT sizes are calculated in bytes by sizeInBytes.

Duplicate

intsuc

2022-11-30, 11:44 AM

2022-11-30, 04:54 PM

2022-11-30, 04:49 PM

4

3

Plausible

Commands

nbt

1.19.3 Pre-release 3

-