mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-09 00:22:08 -07:00
net/minecraft/nbt
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
--- a/net/minecraft/nbt/NbtIo.java
|
||||
+++ b/net/minecraft/nbt/NbtIo.java
|
||||
@@ -1,3 +_,4 @@
|
||||
+// mc-dev import
|
||||
package net.minecraft.nbt;
|
||||
|
||||
import java.io.BufferedOutputStream;
|
||||
@@ -118,6 +_,12 @@
|
||||
}
|
||||
|
||||
public static CompoundTag read(DataInput input, NbtAccounter accounter) throws IOException {
|
||||
+ // Spigot start
|
||||
+ if ( input instanceof io.netty.buffer.ByteBufInputStream )
|
||||
+ {
|
||||
+ input = new DataInputStream(new org.spigotmc.LimitStream((InputStream) input, accounter));
|
||||
+ }
|
||||
+ // Spigot end
|
||||
Tag unnamedTag = readUnnamedTag(input, accounter);
|
||||
if (unnamedTag instanceof CompoundTag) {
|
||||
return (CompoundTag)unnamedTag;
|
Reference in New Issue
Block a user