From da7320fc428a5aa3711e34591e799fcb8192860f Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Thu, 14 Apr 2016 16:48:52 -0500 Subject: [PATCH] Only check for async callers, do not remove potentially used variables Potentially resolves GH-138 --- ...k-async-eligible-spawn-chunks-GH-159.patch | 21 ++++++++++++ ...heck-async-remove-unused-vars-GH-159.patch | 32 ------------------- 2 files changed, 21 insertions(+), 32 deletions(-) create mode 100644 Spigot-Server-Patches/0111-Check-async-eligible-spawn-chunks-GH-159.patch delete mode 100644 Spigot-Server-Patches/0111-Check-async-remove-unused-vars-GH-159.patch diff --git a/Spigot-Server-Patches/0111-Check-async-eligible-spawn-chunks-GH-159.patch b/Spigot-Server-Patches/0111-Check-async-eligible-spawn-chunks-GH-159.patch new file mode 100644 index 0000000000..4d85405e52 --- /dev/null +++ b/Spigot-Server-Patches/0111-Check-async-eligible-spawn-chunks-GH-159.patch @@ -0,0 +1,21 @@ +From 45fbe6bc3de0f99fbbfcca076da14980133b84ef Mon Sep 17 00:00:00 2001 +From: Zach Brown +Date: Sun, 27 Mar 2016 20:24:05 -0500 +Subject: [PATCH] Check async, eligible spawn chunks, GH-159 + + +diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java +index dc7c17c..94b0176 100644 +--- a/src/main/java/net/minecraft/server/SpawnerCreature.java ++++ b/src/main/java/net/minecraft/server/SpawnerCreature.java +@@ -38,6 +38,7 @@ public final class SpawnerCreature { + // Spigot end + + public int a(WorldServer worldserver, boolean flag, boolean flag1, boolean flag2) { ++ org.spigotmc.AsyncCatcher.catchOp("check for eligible spawn chunks"); // Paper - At least until we figure out what is calling this async + if (!flag && !flag1) { + return 0; + } else { +-- +2.8.0 + diff --git a/Spigot-Server-Patches/0111-Check-async-remove-unused-vars-GH-159.patch b/Spigot-Server-Patches/0111-Check-async-remove-unused-vars-GH-159.patch deleted file mode 100644 index 5b6f7a7450..0000000000 --- a/Spigot-Server-Patches/0111-Check-async-remove-unused-vars-GH-159.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 7616ed0a0949bef668e0284f5f0f49218d293be7 Mon Sep 17 00:00:00 2001 -From: Zach Brown -Date: Sun, 27 Mar 2016 20:24:05 -0500 -Subject: [PATCH] Check async, remove unused vars, GH-159 - - -diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index dc7c17c..15a0ce9 100644 ---- a/src/main/java/net/minecraft/server/SpawnerCreature.java -+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java -@@ -38,6 +38,7 @@ public final class SpawnerCreature { - // Spigot end - - public int a(WorldServer worldserver, boolean flag, boolean flag1, boolean flag2) { -+ org.spigotmc.AsyncCatcher.catchOp("check for eligible spawn chunks"); // Paper - At least until we figure out what is calling this async - if (!flag && !flag1) { - return 0; - } else { -@@ -120,8 +121,10 @@ public final class SpawnerCreature { - // CraftBukkit end - - if ((!enumcreaturetype.d() || flag1) && (enumcreaturetype.d() || flag) && (!enumcreaturetype.e() || flag2)) { -+ /* Paper start - As far as I can tell neither of these are even used - k = worldserver.a(enumcreaturetype.a()); - int l1 = limit * i / a; // CraftBukkit - use per-world limits -+ */ // Paper end - - if ((mobcnt = getEntityCount(worldserver, enumcreaturetype.a())) <= limit * i / 256) { - BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition(); --- -2.8.0 -