Finalize immutable locations and add a platform world implementation

This commit is contained in:
Alexander Söderberg
2020-07-10 12:21:29 +02:00
parent cf1b027db9
commit 5341015cb1
51 changed files with 503 additions and 246 deletions

View File

@ -62,7 +62,7 @@ public class GenChunk extends ScopedLocalBlockQueue {
@Getter @Setter private ChunkData chunkData = null;
public GenChunk() {
super(null, new Location(null, 0, 0, 0), new Location(null, 15, 255, 15));
super(null, Location.at("", 0, 0, 0), Location.at("", 15, 255, 15));
this.biomes = Biome.values();
}
@ -196,11 +196,11 @@ public class GenChunk extends ScopedLocalBlockQueue {
}
@Override public Location getMax() {
return new Location(getWorld(), 15 + (getX() << 4), 255, 15 + (getZ() << 4));
return Location.at(getWorld(), 15 + (getX() << 4), 255, 15 + (getZ() << 4));
}
@Override public Location getMin() {
return new Location(getWorld(), getX() << 4, 0, getZ() << 4);
return Location.at(getWorld(), getX() << 4, 0, getZ() << 4);
}
public GenChunk clone() {