Fork of Poseidon providing Bukkit #1060 to older Beta versions (b1.0-b1.7.3)
at develop 56 lines 1.4 kB view raw
1package net.minecraft.server; 2 3public class PathPoint { 4 5 public final int a; 6 public final int b; 7 public final int c; 8 private final int j; 9 int d = -1; 10 float e; 11 float f; 12 float g; 13 PathPoint h; 14 public boolean i = false; 15 16 public PathPoint(int i, int j, int k) { 17 this.a = i; 18 this.b = j; 19 this.c = k; 20 this.j = a(i, j, k); 21 } 22 23 public static int a(int i, int j, int k) { 24 return j & 255 | (i & 32767) << 8 | (k & 32767) << 24 | (i < 0 ? Integer.MIN_VALUE : 0) | (k < 0 ? '\u8000' : 0); 25 } 26 27 public float a(PathPoint pathpoint) { 28 float f = (float) (pathpoint.a - this.a); 29 float f1 = (float) (pathpoint.b - this.b); 30 float f2 = (float) (pathpoint.c - this.c); 31 32 return MathHelper.c(f * f + f1 * f1 + f2 * f2); 33 } 34 35 public boolean equals(Object object) { 36 if (!(object instanceof PathPoint)) { 37 return false; 38 } else { 39 PathPoint pathpoint = (PathPoint) object; 40 41 return this.j == pathpoint.j && this.a == pathpoint.a && this.b == pathpoint.b && this.c == pathpoint.c; 42 } 43 } 44 45 public int hashCode() { 46 return this.j; 47 } 48 49 public boolean a() { 50 return this.d >= 0; 51 } 52 53 public String toString() { 54 return this.a + ", " + this.b + ", " + this.c; 55 } 56}