aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/com/github/technus/tectech/vec3pos.java12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/main/java/com/github/technus/tectech/vec3pos.java b/src/main/java/com/github/technus/tectech/vec3pos.java
index 2de982ea95..1a4a38f142 100644
--- a/src/main/java/com/github/technus/tectech/vec3pos.java
+++ b/src/main/java/com/github/technus/tectech/vec3pos.java
@@ -23,13 +23,11 @@ public class vec3pos implements Comparable<vec3pos> {
@Override
public int compareTo(vec3pos o) {
- if (y > o.y) return 1;
- if (y < o.y) return -1;
- if (x > o.x) return 1;
- if (x < o.x) return -1;
- if (z > o.z) return 1;
- if (z < o.z) return -1;
- return 0;
+ int tmp=y-o.y;
+ if (tmp!=0) return tmp;
+ tmp=x-o.x;
+ if (tmp!=0) return tmp;
+ return z-o.z;
}
@Override