Patrone.cc-src-skid-me/toothless/server/nms-patches/PathfinderGoalSelector.patch
disclearing 4f52c57848 MEME ME :heart
FUCK PUTTYEXE
2019-06-19 04:50:21 +01:00

31 lines
1.9 KiB
Diff

--- a/net/minecraft/server/PathfinderGoalSelector.java
+++ b/net/minecraft/server/PathfinderGoalSelector.java
@@ -6,11 +6,13 @@
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<PathfinderGoalSelector.PathfinderGoalSelectorItem> b = Lists.newArrayList();
- private List<PathfinderGoalSelector.PathfinderGoalSelectorItem> c = Lists.newArrayList();
+ private List<PathfinderGoalSelector.PathfinderGoalSelectorItem> b = new UnsafeList<PathfinderGoalSelector.PathfinderGoalSelectorItem>();
+ private List<PathfinderGoalSelector.PathfinderGoalSelectorItem> c = new UnsafeList<PathfinderGoalSelector.PathfinderGoalSelectorItem>();
private final MethodProfiler d;
private int e;
private int f = 3;
@@ -107,9 +109,11 @@
if (pathfindergoalselector_pathfindergoalselectoritem1 != pathfindergoalselector_pathfindergoalselectoritem) {
if (pathfindergoalselector_pathfindergoalselectoritem.b >= pathfindergoalselector_pathfindergoalselectoritem1.b) {
if (!this.a(pathfindergoalselector_pathfindergoalselectoritem, pathfindergoalselector_pathfindergoalselectoritem1) && this.c.contains(pathfindergoalselector_pathfindergoalselectoritem1)) {
+ ((UnsafeList.Itr) iterator).valid = false; // CraftBukkit - mark iterator for reuse
return false;
}
} else if (!pathfindergoalselector_pathfindergoalselectoritem1.a.i() && this.c.contains(pathfindergoalselector_pathfindergoalselectoritem1)) {
+ ((UnsafeList.Itr) iterator).valid = false; // CraftBukkit - mark iterator for reuse
return false;
}
}