From c467867acaae6dd0865e432f80d0563944d6b083 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 12 Apr 2014 14:49:42 +1000 Subject: [PATCH] Finish up Minecraft 1.7.8 support. This is a dev build, no warranty etc etc. It does not yet support Minecraft 1.7.2/1.7.5. --- CraftBukkit-Patches/0002-mc-dev-imports.patch | 20 ++++++++++-------- ...ing-on-corrupted-map-data-NBT-arrays.patch | 14 ++++++------- ...ragon-death-and-wither-spawn-sounds.patch} | 2 +- ...getOfflinePlayer-UUID-on-main-thread.patch | 21 ------------------- ...getting-ticked-after-being-queued-f.patch} | 2 +- ...-client-crashes-server-lists-and-Mo.patch} | 2 +- 6 files changed, 21 insertions(+), 40 deletions(-) rename CraftBukkit-Patches/{0122-Configurable-dragon-death-and-wither-spawn-sounds.patch => 0121-Configurable-dragon-death-and-wither-spawn-sounds.patch} (98%) delete mode 100644 CraftBukkit-Patches/0121-Prevent-getOfflinePlayer-UUID-on-main-thread.patch rename CraftBukkit-Patches/{0123-Fix-TileEntities-getting-ticked-after-being-queued-f.patch => 0122-Fix-TileEntities-getting-ticked-after-being-queued-f.patch} (95%) rename CraftBukkit-Patches/{0124-Display-Spigot-in-client-crashes-server-lists-and-Mo.patch => 0123-Display-Spigot-in-client-crashes-server-lists-and-Mo.patch} (92%) diff --git a/CraftBukkit-Patches/0002-mc-dev-imports.patch b/CraftBukkit-Patches/0002-mc-dev-imports.patch index 3d799c469c..1fa1978d2f 100644 --- a/CraftBukkit-Patches/0002-mc-dev-imports.patch +++ b/CraftBukkit-Patches/0002-mc-dev-imports.patch @@ -1,4 +1,4 @@ -From 6fd3d3a404c44bdb8aac56011d38dc5ff8a07ff8 Mon Sep 17 00:00:00 2001 +From 97931158dba30a063fcac2dccac4be91e89f6fb3 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 1 Dec 2013 15:10:48 +1100 Subject: [PATCH] mc-dev imports @@ -1181,7 +1181,7 @@ index 0000000..90a2a80 +} diff --git a/src/main/java/net/minecraft/server/NBTBase.java b/src/main/java/net/minecraft/server/NBTBase.java new file mode 100644 -index 0000000..6e7c3a2 +index 0000000..02206f5 --- /dev/null +++ b/src/main/java/net/minecraft/server/NBTBase.java @@ -0,0 +1,129 @@ @@ -1197,7 +1197,7 @@ index 0000000..6e7c3a2 + + abstract void write(DataOutput dataoutput) throws IOException; + -+ abstract void load(DataInput datainput, int i) throws IOException; ++ abstract void load(DataInput datainput, int i, NBTReadLimiter nbtreadlimiter) throws IOException; + + public abstract String toString(); + @@ -1316,10 +1316,10 @@ index 0000000..6e7c3a2 +} diff --git a/src/main/java/net/minecraft/server/NBTTagByteArray.java b/src/main/java/net/minecraft/server/NBTTagByteArray.java new file mode 100644 -index 0000000..916d935 +index 0000000..3eeed3e --- /dev/null +++ b/src/main/java/net/minecraft/server/NBTTagByteArray.java -@@ -0,0 +1,56 @@ +@@ -0,0 +1,57 @@ +package net.minecraft.server; + +import java.io.DataInput; @@ -1342,9 +1342,10 @@ index 0000000..916d935 + dataoutput.write(this.data); + } + -+ void load(DataInput datainput, int i) throws IOException { ++ void load(DataInput datainput, int i, NBTReadLimiter nbtreadlimiter) throws IOException { + int j = datainput.readInt(); + ++ nbtreadlimiter.a((long) (8 * j)); + this.data = new byte[j]; + datainput.readFully(this.data); + } @@ -1378,10 +1379,10 @@ index 0000000..916d935 +} diff --git a/src/main/java/net/minecraft/server/NBTTagIntArray.java b/src/main/java/net/minecraft/server/NBTTagIntArray.java new file mode 100644 -index 0000000..49b3f14 +index 0000000..c7cea7f --- /dev/null +++ b/src/main/java/net/minecraft/server/NBTTagIntArray.java -@@ -0,0 +1,72 @@ +@@ -0,0 +1,73 @@ +package net.minecraft.server; + +import java.io.DataInput; @@ -1407,9 +1408,10 @@ index 0000000..49b3f14 + } + } + -+ void load(DataInput datainput, int i) throws IOException { ++ void load(DataInput datainput, int i, NBTReadLimiter nbtreadlimiter) throws IOException { + int j = datainput.readInt(); + ++ nbtreadlimiter.a((long) (32 * j)); + this.data = new int[j]; + + for (int k = 0; k < j; ++k) { diff --git a/CraftBukkit-Patches/0090-Catch-stalling-on-corrupted-map-data-NBT-arrays.patch b/CraftBukkit-Patches/0090-Catch-stalling-on-corrupted-map-data-NBT-arrays.patch index ee16008cdc..18adb0b562 100644 --- a/CraftBukkit-Patches/0090-Catch-stalling-on-corrupted-map-data-NBT-arrays.patch +++ b/CraftBukkit-Patches/0090-Catch-stalling-on-corrupted-map-data-NBT-arrays.patch @@ -1,33 +1,33 @@ -From 5435dff5b0701d0df40e1d1259226800c7c62d2e Mon Sep 17 00:00:00 2001 +From bbf9a4a1446a2b32c4f0e372ef29b50bbf5bc460 Mon Sep 17 00:00:00 2001 From: md_5 Date: Mon, 20 Jan 2014 13:44:07 +1100 Subject: [PATCH] Catch stalling on corrupted map data / NBT arrays. diff --git a/src/main/java/net/minecraft/server/NBTTagByteArray.java b/src/main/java/net/minecraft/server/NBTTagByteArray.java -index 916d935..c2e81cb 100644 +index 3eeed3e..78a1b9a 100644 --- a/src/main/java/net/minecraft/server/NBTTagByteArray.java +++ b/src/main/java/net/minecraft/server/NBTTagByteArray.java @@ -22,6 +22,7 @@ public class NBTTagByteArray extends NBTBase { - void load(DataInput datainput, int i) throws IOException { + void load(DataInput datainput, int i, NBTReadLimiter nbtreadlimiter) throws IOException { int j = datainput.readInt(); + com.google.common.base.Preconditions.checkArgument( j < 1 << 24); + nbtreadlimiter.a((long) (8 * j)); this.data = new byte[j]; - datainput.readFully(this.data); diff --git a/src/main/java/net/minecraft/server/NBTTagIntArray.java b/src/main/java/net/minecraft/server/NBTTagIntArray.java -index 49b3f14..4d6a9da 100644 +index c7cea7f..099e16a 100644 --- a/src/main/java/net/minecraft/server/NBTTagIntArray.java +++ b/src/main/java/net/minecraft/server/NBTTagIntArray.java @@ -25,6 +25,7 @@ public class NBTTagIntArray extends NBTBase { - void load(DataInput datainput, int i) throws IOException { + void load(DataInput datainput, int i, NBTReadLimiter nbtreadlimiter) throws IOException { int j = datainput.readInt(); + com.google.common.base.Preconditions.checkArgument( j < 1 << 24); + nbtreadlimiter.a((long) (32 * j)); this.data = new int[j]; - -- 1.8.3.2 diff --git a/CraftBukkit-Patches/0122-Configurable-dragon-death-and-wither-spawn-sounds.patch b/CraftBukkit-Patches/0121-Configurable-dragon-death-and-wither-spawn-sounds.patch similarity index 98% rename from CraftBukkit-Patches/0122-Configurable-dragon-death-and-wither-spawn-sounds.patch rename to CraftBukkit-Patches/0121-Configurable-dragon-death-and-wither-spawn-sounds.patch index 7106afe6fb..5151bbebd9 100644 --- a/CraftBukkit-Patches/0122-Configurable-dragon-death-and-wither-spawn-sounds.patch +++ b/CraftBukkit-Patches/0121-Configurable-dragon-death-and-wither-spawn-sounds.patch @@ -1,4 +1,4 @@ -From 5f16a34374e9bbd0b7aed359e2b3cc236ab0f5a0 Mon Sep 17 00:00:00 2001 +From 190ffd644a3fb1104d30b7697bde6cf28bb3e4bc Mon Sep 17 00:00:00 2001 From: drXor Date: Sat, 29 Mar 2014 13:44:25 -0400 Subject: [PATCH] Configurable dragon death and wither spawn sounds diff --git a/CraftBukkit-Patches/0121-Prevent-getOfflinePlayer-UUID-on-main-thread.patch b/CraftBukkit-Patches/0121-Prevent-getOfflinePlayer-UUID-on-main-thread.patch deleted file mode 100644 index 1f67e7237d..0000000000 --- a/CraftBukkit-Patches/0121-Prevent-getOfflinePlayer-UUID-on-main-thread.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 3ca585448f331bc7961ad0579e3cb5f8e6314215 Mon Sep 17 00:00:00 2001 -From: md_5 -Date: Sun, 30 Mar 2014 09:15:35 +1100 -Subject: [PATCH] Prevent getOfflinePlayer(UUID) on main thread. - - -diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 2645c97..17ebcce 100644 ---- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java -+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1304,6 +1304,7 @@ public final class CraftServer implements Server { - - public OfflinePlayer getOfflinePlayer(String name) { - Validate.notNull(name, "Name cannot be null"); -+ com.google.common.base.Preconditions.checkState(!Bukkit.isPrimaryThread(), "Cannot call getOfflinePlayer(UUID) on main thread, this operation is blocking!"); // Spigot - - // This is potentially blocking :( - GameProfile profile = MinecraftServer.getServer().getUserCache().a(name); --- -1.8.3.2 - diff --git a/CraftBukkit-Patches/0123-Fix-TileEntities-getting-ticked-after-being-queued-f.patch b/CraftBukkit-Patches/0122-Fix-TileEntities-getting-ticked-after-being-queued-f.patch similarity index 95% rename from CraftBukkit-Patches/0123-Fix-TileEntities-getting-ticked-after-being-queued-f.patch rename to CraftBukkit-Patches/0122-Fix-TileEntities-getting-ticked-after-being-queued-f.patch index a548e4222d..d68fdf7885 100644 --- a/CraftBukkit-Patches/0123-Fix-TileEntities-getting-ticked-after-being-queued-f.patch +++ b/CraftBukkit-Patches/0122-Fix-TileEntities-getting-ticked-after-being-queued-f.patch @@ -1,4 +1,4 @@ -From 43f56ba461edd0a4d4c77a14b2628ab91bbc0e92 Mon Sep 17 00:00:00 2001 +From ce57b30bd5c30b3b97a3a4ca15f659155d3e4467 Mon Sep 17 00:00:00 2001 From: FrozenBrain Date: Sun, 23 Mar 2014 01:49:13 +0100 Subject: [PATCH] Fix TileEntities getting ticked after being queued for diff --git a/CraftBukkit-Patches/0124-Display-Spigot-in-client-crashes-server-lists-and-Mo.patch b/CraftBukkit-Patches/0123-Display-Spigot-in-client-crashes-server-lists-and-Mo.patch similarity index 92% rename from CraftBukkit-Patches/0124-Display-Spigot-in-client-crashes-server-lists-and-Mo.patch rename to CraftBukkit-Patches/0123-Display-Spigot-in-client-crashes-server-lists-and-Mo.patch index ab1b0572aa..aa22b05969 100644 --- a/CraftBukkit-Patches/0124-Display-Spigot-in-client-crashes-server-lists-and-Mo.patch +++ b/CraftBukkit-Patches/0123-Display-Spigot-in-client-crashes-server-lists-and-Mo.patch @@ -1,4 +1,4 @@ -From 42f834d1bd2a0f85ab7ab451f7a6fb272e99c983 Mon Sep 17 00:00:00 2001 +From 73cec768b7e20989ac126fe26abdfc8a760d704a Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Fri, 11 Apr 2014 11:16:34 +0100 Subject: [PATCH] Display 'Spigot' in client crashes, server lists and Mojang