mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-05 20:36:42 +00:00
Move vectors to static creators, for caching
This commit is contained in:
@ -114,12 +114,12 @@ public abstract class AbstractWorld implements World {
|
||||
|
||||
@Override
|
||||
public BlockVector3 getMinimumPoint() {
|
||||
return new BlockVector3(-30000000, 0, -30000000);
|
||||
return BlockVector3.at(-30000000, 0, -30000000);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockVector3 getMaximumPoint() {
|
||||
return new BlockVector3(30000000, 255, 30000000);
|
||||
return BlockVector3.at(30000000, 255, 30000000);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -224,7 +224,7 @@ public class AnvilChunk implements Chunk {
|
||||
values.put(entry.getKey(), entry.getValue());
|
||||
}
|
||||
|
||||
BlockVector3 vec = new BlockVector3(x, y, z);
|
||||
BlockVector3 vec = BlockVector3.at(x, y, z);
|
||||
tileEntities.put(vec, values);
|
||||
}
|
||||
}
|
||||
|
@ -200,7 +200,7 @@ public class AnvilChunk13 implements Chunk {
|
||||
values.put(entry.getKey(), entry.getValue());
|
||||
}
|
||||
|
||||
BlockVector3 vec = new BlockVector3(x, y, z);
|
||||
BlockVector3 vec = BlockVector3.at(x, y, z);
|
||||
tileEntities.put(vec, values);
|
||||
}
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ public class OldChunk implements Chunk {
|
||||
values.put(entry.getKey(), entry.getValue());
|
||||
}
|
||||
|
||||
BlockVector3 vec = new BlockVector3(x, y, z);
|
||||
BlockVector3 vec = BlockVector3.at(x, y, z);
|
||||
tileEntities.put(vec, values);
|
||||
}
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ public class SnapshotRestore {
|
||||
for (int x = min.getBlockX(); x <= max.getBlockX(); ++x) {
|
||||
for (int y = min.getBlockY(); y <= max.getBlockY(); ++y) {
|
||||
for (int z = min.getBlockZ(); z <= max.getBlockZ(); ++z) {
|
||||
BlockVector3 pos = new BlockVector3(x, y, z);
|
||||
BlockVector3 pos = BlockVector3.at(x, y, z);
|
||||
checkAndAddBlock(pos);
|
||||
}
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ public abstract class ChunkStore implements Closeable {
|
||||
* @return chunk coordinates
|
||||
*/
|
||||
public static BlockVector2 toChunk(BlockVector3 position) {
|
||||
return new BlockVector2(position.getX() >> CHUNK_SHIFTS, position.getZ() >> CHUNK_SHIFTS);
|
||||
return BlockVector2.at(position.getX() >> CHUNK_SHIFTS, position.getZ() >> CHUNK_SHIFTS);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user