summaryrefslogtreecommitdiffstats
path: root/nms-patches
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2016-04-12 18:25:18 +1000
committermd_5 <git@md-5.net>2016-04-12 18:25:18 +1000
commitf6313791d0f8575e4a3a35c11145f794b8acedd4 (patch)
tree9ccc194bb3ce0a2b7bae50ab55be752ce7ac7f63 /nms-patches
parent1e2fcb38e4a20cb0839d1b22103b04661cc9f229 (diff)
downloadcraftbukkit-f6313791d0f8575e4a3a35c11145f794b8acedd4.tar
craftbukkit-f6313791d0f8575e4a3a35c11145f794b8acedd4.tar.gz
craftbukkit-f6313791d0f8575e4a3a35c11145f794b8acedd4.tar.lz
craftbukkit-f6313791d0f8575e4a3a35c11145f794b8acedd4.tar.xz
craftbukkit-f6313791d0f8575e4a3a35c11145f794b8acedd4.zip
staticify backported method
Diffstat (limited to 'nms-patches')
-rw-r--r--nms-patches/PathfinderNormal.patch21
1 files changed, 5 insertions, 16 deletions
diff --git a/nms-patches/PathfinderNormal.patch b/nms-patches/PathfinderNormal.patch
index b5e9d938..1beacfe2 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();