2024-12-11 22:26:55 +01:00
|
|
|
--- a/net/minecraft/nbt/NbtIo.java
|
|
|
|
+++ b/net/minecraft/nbt/NbtIo.java
|
|
|
|
@@ -1,3 +1,4 @@
|
|
|
|
+// mc-dev import
|
|
|
|
package net.minecraft.nbt;
|
|
|
|
|
|
|
|
import java.io.BufferedOutputStream;
|
2014-07-27 12:46:04 +02:00
|
|
|
@@ -324,6 +325,12 @@
|
|
|
|
}
|
|
|
|
|
|
|
|
public static CompoundTag read(DataInput input, NbtAccounter tracker) throws IOException {
|
|
|
|
+ // Spigot start
|
|
|
|
+ if ( input instanceof io.netty.buffer.ByteBufInputStream )
|
|
|
|
+ {
|
|
|
|
+ input = new DataInputStream(new org.spigotmc.LimitStream((InputStream) input, tracker));
|
|
|
|
+ }
|
|
|
|
+ // Spigot end
|
|
|
|
Tag nbtbase = NbtIo.readUnnamedTag(input, tracker);
|
|
|
|
|
|
|
|
if (nbtbase instanceof CompoundTag) {
|