initial commit

This commit is contained in:
Sen 2025-03-11 00:23:54 +01:00 committed by Sen
parent 3c9ee26b06
commit 22186c33b9
1458 changed files with 282792 additions and 0 deletions

View file

@ -0,0 +1,34 @@
package game.world;
public class ChunkPos {
public final int x;
public final int z;
public ChunkPos(int x, int z) {
this.x = x;
this.z = z;
}
public int hashCode() {
int i = 1664525 * this.x + 1013904223;
int j = 1664525 * (this.z ^ -559038737) + 1013904223;
return i ^ j;
}
public boolean equals(Object obj) {
if(this == obj) {
return true;
}
else if(!(obj instanceof ChunkPos)) {
return false;
}
else {
ChunkPos pos = (ChunkPos)obj;
return this.x == pos.x && this.z == pos.z;
}
}
public String toString() {
return "[" + this.x + ", " + this.z + "]";
}
}