Commits

Thinkofname authored 7019900e276
Backport fix from 1.8.3
No tags

nms-patches/NBTTagList.patch

Added
1 +--- ../work/decompile-8eb82bde//net/minecraft/server/NBTTagList.java 2015-04-16 22:50:27.960251957 +0100
2 ++++ src/main/java/net/minecraft/server/NBTTagList.java 2015-04-16 22:50:27.960251957 +0100
3 +@@ -3,6 +3,7 @@
4 + import com.google.common.collect.Lists;
5 + import java.io.DataInput;
6 + import java.io.DataOutput;
7 ++import java.io.IOException;
8 + import java.util.Iterator;
9 + import java.util.List;
10 + import org.apache.logging.log4j.LogManager;
11 +@@ -23,8 +24,10 @@
12 + this.type = 0;
13 + }
14 +
15 ++ try { // CraftBukkit
16 + dataoutput.writeByte(this.type);
17 + dataoutput.writeInt(this.list.size());
18 ++ } catch (Throwable t) { sneakyThrow(t); } // CraftBukkit
19 +
20 + for (int i = 0; i < this.list.size(); ++i) {
21 + ((NBTBase) this.list.get(i)).write(dataoutput);
22 +@@ -33,12 +36,14 @@
23 + }
24 +
25 + void load(DataInput datainput, int i, NBTReadLimiter nbtreadlimiter) {
26 ++ try { // CraftBukkit
27 + if (i > 512) {
28 + throw new RuntimeException("Tried to read NBT tag with too high complexity, depth > 512");
29 + } else {
30 + nbtreadlimiter.a(8L);
31 + this.type = datainput.readByte();
32 + int j = datainput.readInt();
33 ++ nbtreadlimiter.a(j * 8); // CraftBukkit
34 +
35 + this.list = Lists.newArrayList();
36 +
37 +@@ -50,6 +55,7 @@
38 + }
39 +
40 + }
41 ++ } catch (Throwable t) { sneakyThrow(t); } // CraftBukkit
42 + }
43 +
44 + public byte getTypeId() {
45 +@@ -196,4 +202,14 @@
46 + public int f() {
47 + return this.type;
48 + }
49 ++
50 ++ // CraftBukkit start
51 ++ public static void sneakyThrow(Throwable ex) {
52 ++ NBTTagList.<RuntimeException>sneakyThrowInner(ex);
53 ++ }
54 ++
55 ++ public static <T extends Throwable> T sneakyThrowInner(Throwable ex) throws T {
56 ++ throw (T) ex;
57 ++ }
58 ++ // CraftBukkit end
59 + }

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut