diff options
author | Wesley Wolfe <weswolf@aol.com> | 2012-09-09 23:19:28 -0500 |
---|---|---|
committer | Wesley Wolfe <weswolf@aol.com> | 2012-09-09 23:19:28 -0500 |
commit | e2b1514daf678d8ea95a71af8bbb2a9b8efb3440 (patch) | |
tree | e6ef9925375e2c422f8c067c505a86179304168f /src/main/java/net/minecraft/server/PathfinderGoalSelector.java | |
parent | b1f6d16bfafd79d5b504e96b2b5e767de3acf227 (diff) | |
download | craftbukkit-e2b1514daf678d8ea95a71af8bbb2a9b8efb3440.tar craftbukkit-e2b1514daf678d8ea95a71af8bbb2a9b8efb3440.tar.gz craftbukkit-e2b1514daf678d8ea95a71af8bbb2a9b8efb3440.tar.lz craftbukkit-e2b1514daf678d8ea95a71af8bbb2a9b8efb3440.tar.xz craftbukkit-e2b1514daf678d8ea95a71af8bbb2a9b8efb3440.zip |
Bulk pending cleanup.
Diffstat (limited to 'src/main/java/net/minecraft/server/PathfinderGoalSelector.java')
-rw-r--r-- | src/main/java/net/minecraft/server/PathfinderGoalSelector.java | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalSelector.java b/src/main/java/net/minecraft/server/PathfinderGoalSelector.java index 38f53522..cf4cce0a 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalSelector.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalSelector.java @@ -65,42 +65,42 @@ public class PathfinderGoalSelector { } } - // this.c.a("goalStart"); // CraftBukkit - not in production code + this.c.a("goalStart"); // CraftBukkit start - removed usage of arraylist /*iterator = arraylist.iterator(); while (iterator.hasNext()) { pathfindergoalselectoritem = (PathfinderGoalSelectorItem) iterator.next(); - // this.c.a(pathfindergoalselectoritem.a.getClass().getSimpleName()); // CraftBukkit - not in production code + this.c.a(pathfindergoalselectoritem.a.getClass().getSimpleName()); pathfindergoalselectoritem.a.e(); - // this.c.b(); // CraftBukkit - not in production code + this.c.b(); }*/ // CraftBukkit end - // this.c.b(); // CraftBukkit - not in production code - // this.c.a("goalTick"); // CraftBukkit - not in production code + this.c.b(); + this.c.a("goalTick"); iterator = this.b.iterator(); while (iterator.hasNext()) { pathfindergoalselectoritem = (PathfinderGoalSelectorItem) iterator.next(); - // this.c.a(pathfindergoalselectoritem.a.getClass().getSimpleName()); // CraftBukkit - not in production code + // this.c.a(pathfindergoalselectoritem.a.getClass().getSimpleName()); // CraftBukkit - getSimpleName is expensive pathfindergoalselectoritem.a.d(); - // this.c.b(); // CraftBukkit - not in production code + // this.c.b(); // CraftBukkit - paired with above comment } - // this.c.b(); // CraftBukkit - not in production code + this.c.b(); } private boolean a(PathfinderGoalSelectorItem pathfindergoalselectoritem) { - // this.c.a("canContinue"); // CraftBukkit - not in production code + this.c.a("canContinue"); boolean flag = pathfindergoalselectoritem.a.b(); - // this.c.b(); // CraftBukkit - not in production code + this.c.b(); return flag; } private boolean b(PathfinderGoalSelectorItem pathfindergoalselectoritem) { - // this.c.a("canUse"); // CraftBukkit - not in production code + this.c.a("canUse"); Iterator iterator = this.a.iterator(); while (iterator.hasNext()) { @@ -110,20 +110,20 @@ public class PathfinderGoalSelector { if (pathfindergoalselectoritem.b >= pathfindergoalselectoritem1.b) { // CraftBukkit - switch order if (!this.a(pathfindergoalselectoritem, pathfindergoalselectoritem1) && this.b.contains(pathfindergoalselectoritem1)) { - // this.c.b(); // CraftBukkit - not in production code + this.c.b(); ((UnsafeList.Itr) iterator).valid = false; // CraftBukkit - mark iterator for reuse return false; } // CraftBukkit - switch order } else if (!pathfindergoalselectoritem1.a.g() && this.b.contains(pathfindergoalselectoritem1)) { - // this.c.b(); // CraftBukkit - not in production code + this.c.b(); ((UnsafeList.Itr) iterator).valid = false; // CraftBukkit - mark iterator for reuse return false; } } } - // this.c.b(); // CraftBukkit - not in production code + this.c.b(); return true; } |