summaryrefslogtreecommitdiffstats
path: root/nms-patches/PathfinderGoalSelector.patch
diff options
context:
space:
mode:
authorThinkofdeath <thinkofdeath@spigotmc.org>2014-11-26 08:32:16 +1100
committermd_5 <git@md-5.net>2014-11-28 17:16:30 +1100
commit24557bc2b37deb6a0edf497d547471832457b1dd (patch)
treec560572889a3b0b34964a0cddb35dc87fda3c914 /nms-patches/PathfinderGoalSelector.patch
parenta4805dbd77da057cc1ea0bf344379bc6e53ca1f6 (diff)
downloadcraftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar
craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.gz
craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.lz
craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.xz
craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.zip
Update to Minecraft 1.8
For more information please see http://www.spigotmc.org/
Diffstat (limited to 'nms-patches/PathfinderGoalSelector.patch')
-rw-r--r--nms-patches/PathfinderGoalSelector.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/nms-patches/PathfinderGoalSelector.patch b/nms-patches/PathfinderGoalSelector.patch
new file mode 100644
index 00000000..e4b9428f
--- /dev/null
+++ b/nms-patches/PathfinderGoalSelector.patch
@@ -0,0 +1,32 @@
+--- ../work/decompile-bb26c12b/net/minecraft/server/PathfinderGoalSelector.java 2014-11-27 08:59:46.837421248 +1100
++++ src/main/java/net/minecraft/server/PathfinderGoalSelector.java 2014-11-27 08:42:10.164850887 +1100
+@@ -6,11 +6,15 @@
+ import org.apache.logging.log4j.LogManager;
+ import org.apache.logging.log4j.Logger;
+
++import org.bukkit.craftbukkit.util.UnsafeList; // CraftBukkit
++
+ public class PathfinderGoalSelector {
+
+ private static final Logger a = LogManager.getLogger();
+- private List b = Lists.newArrayList();
+- private List c = Lists.newArrayList();
++ // CraftBukkit start - ArrayList -> UnsafeList
++ private List b = new UnsafeList();
++ private List c = new UnsafeList();
++ // CraftBukkit end
+ private final MethodProfiler d;
+ private int e;
+ private int f = 3;
+@@ -107,9 +111,11 @@
+ if (pathfindergoalselectoritem1 != pathfindergoalselectoritem) {
+ if (pathfindergoalselectoritem.b >= pathfindergoalselectoritem1.b) {
+ if (!this.a(pathfindergoalselectoritem, pathfindergoalselectoritem1) && this.c.contains(pathfindergoalselectoritem1)) {
++ ((UnsafeList.Itr) iterator).valid = false; // CraftBukkit - mark iterator for reuse
+ return false;
+ }
+ } else if (!pathfindergoalselectoritem1.a.i() && this.c.contains(pathfindergoalselectoritem1)) {
++ ((UnsafeList.Itr) iterator).valid = false; // CraftBukkit - mark iterator for reuse
+ return false;
+ }
+ }