0
0
mirror of https://github.com/PaperMC/Paper.git synced 2025-02-07 15:09:56 +00:00
2024-12-18 19:29:39 +01:00

15 lines
600 B
Diff

--- a/net/minecraft/nbt/NbtIo.java
+++ b/net/minecraft/nbt/NbtIo.java
@@ -118,6 +_,11 @@
}
public static CompoundTag read(DataInput input, NbtAccounter accounter) throws IOException {
+ // Spigot start
+ if (input instanceof io.netty.buffer.ByteBufInputStream byteBufInputStream) {
+ input = new DataInputStream(new org.spigotmc.LimitStream(byteBufInputStream, accounter));
+ }
+ // Spigot end
Tag unnamedTag = readUnnamedTag(input, accounter);
if (unnamedTag instanceof CompoundTag) {
return (CompoundTag)unnamedTag;