From f6313791d0f8575e4a3a35c11145f794b8acedd4 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 12 Apr 2016 18:25:18 +1000 Subject: [PATCH] staticify backported method --- nms-patches/PathfinderNormal.patch | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/nms-patches/PathfinderNormal.patch b/nms-patches/PathfinderNormal.patch index b5e9d9383a..1beacfe24f 100644 --- a/nms-patches/PathfinderNormal.patch +++ b/nms-patches/PathfinderNormal.patch @@ -26,27 +26,16 @@ private PathPoint a(int i, int j, int k, int l, double d0, EnumDirection enumdirection) { PathPoint pathpoint = null; BlockPosition blockposition = new BlockPosition(i, j, k); -@@ -221,7 +223,7 @@ - for (int k1 = i; k1 < i + l; ++k1) { - for (int l1 = j; l1 < j + i1; ++l1) { - for (int i2 = k; i2 < k + j1; ++i2) { -- PathType pathtype1 = a(iblockaccess, k1, l1, i2); -+ PathType pathtype1 = this.a(iblockaccess, k1, l1, i2); - - if (pathtype1 == PathType.DOOR_WOOD_CLOSED && flag && flag1) { - pathtype1 = PathType.WALKABLE; -@@ -286,71 +288,43 @@ - return this.a(this.a, i, j, k, entityinsentient, this.d, this.e, this.f, this.d(), this.c()); +@@ -287,70 +289,42 @@ } -- public static PathType a(IBlockAccess iblockaccess, int i, int j, int k) { + public static PathType a(IBlockAccess iblockaccess, int i, int j, int k) { - BlockPosition blockposition = new BlockPosition(i, j, k); - IBlockData iblockdata = iblockaccess.getType(blockposition); - Block block = iblockdata.getBlock(); - Material material = iblockdata.getMaterial(); - PathType pathtype = PathType.BLOCKED; -+ public PathType a(IBlockAccess iblockaccess, int i, int j, int k) { -+ PathType pathtype = this.b(iblockaccess, i, j, k); ++ PathType pathtype = b(iblockaccess, i, j, k); - if (block != Blocks.TRAPDOOR && block != Blocks.IRON_TRAPDOOR && block != Blocks.WATERLILY) { - if (block == Blocks.FIRE) { @@ -69,7 +58,7 @@ - return PathType.WATER; - } + if (pathtype == PathType.OPEN && j >= 1) { -+ PathType pathtype1 = this.b(iblockaccess, i, j - 1, k); ++ PathType pathtype1 = b(iblockaccess, i, j - 1, k); - if (material == Material.LAVA) { - return PathType.LAVA; @@ -126,7 +115,7 @@ + return pathtype; + } + -+ private PathType b(IBlockAccess iblockaccess, int i, int j, int k) { ++ private static PathType b(IBlockAccess iblockaccess, int i, int j, int k) { + BlockPosition blockposition = new BlockPosition(i, j, k); + IBlockData iblockdata = iblockaccess.getType(blockposition); + Block block = iblockdata.getBlock();