papermc/paper-server/patches/sources/net/minecraft/nbt/NbtIo.java.patch

15 lines
600 B
Diff
Raw Normal View History

--- a/net/minecraft/nbt/NbtIo.java
+++ b/net/minecraft/nbt/NbtIo.java
@@ -119,6 +_,11 @@
}
2024-12-14 17:35:55 -05:00
public static CompoundTag read(DataInput input, NbtAccounter accounter) throws IOException {
+ // Spigot start
2024-12-18 19:09:46 +01:00
+ if (input instanceof io.netty.buffer.ByteBufInputStream byteBufInputStream) {
+ input = new DataInputStream(new org.spigotmc.LimitStream(byteBufInputStream, accounter));
+ }
+ // Spigot end
2024-12-14 17:35:55 -05:00
Tag unnamedTag = readUnnamedTag(input, accounter);
if (unnamedTag instanceof CompoundTag) {
return (CompoundTag)unnamedTag;