This commit is contained in:
dfsek
2021-01-09 02:58:02 -07:00
parent 141b4f86ae
commit 9310114c0e
5 changed files with 10 additions and 4 deletions
@@ -90,4 +90,8 @@ public final class MathUtil {
return Math.sqrt(((xVal2 - xVal1) * (xVal2 - xVal1)) + ((zVal2 - zVal1) * (zVal2 - zVal1)) + ((yVal2 - yVal1) * (yVal2 - yVal1)));
}
public static long squash(int first, int last) {
return (((long) first) << 32) | (last & 0xffffffffL);
}
}
@@ -43,7 +43,7 @@ public class ChunkCoordinate implements Serializable {
@Override
public boolean equals(Object obj) {
if(!(obj instanceof com.dfsek.terra.api.world.generation.population.ChunkCoordinate)) return false;
if(!(obj instanceof ChunkCoordinate)) return false;
com.dfsek.terra.api.world.generation.population.ChunkCoordinate other = (com.dfsek.terra.api.world.generation.population.ChunkCoordinate) obj;
return other.getX() == x && other.getZ() == z;
}