geforkt von Mirrors/FastAsyncWorldEdit
More efficient chunk calculation of CuboidRegion
Dieser Commit ist enthalten in:
Ursprung
62befe7594
Commit
03f8843c20
@ -300,10 +300,9 @@ public class CuboidRegion extends AbstractRegion implements FlatRegion {
|
|||||||
Vector min = getMinimumPoint();
|
Vector min = getMinimumPoint();
|
||||||
Vector max = getMaximumPoint();
|
Vector max = getMaximumPoint();
|
||||||
|
|
||||||
for (int x = min.getBlockX(); x <= max.getBlockX(); ++x) {
|
for (int x = min.getBlockX() >> ChunkStore.CHUNK_SHIFTS; x <= max.getBlockX() >> ChunkStore.CHUNK_SHIFTS; ++x) {
|
||||||
for (int z = min.getBlockZ(); z <= max.getBlockZ(); ++z) {
|
for (int z = min.getBlockZ() >> ChunkStore.CHUNK_SHIFTS; z <= max.getBlockZ() >> ChunkStore.CHUNK_SHIFTS; ++z) {
|
||||||
chunks.add(new BlockVector2D(x >> ChunkStore.CHUNK_SHIFTS,
|
chunks.add(new BlockVector2D(x, z));
|
||||||
z >> ChunkStore.CHUNK_SHIFTS));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -317,11 +316,10 @@ public class CuboidRegion extends AbstractRegion implements FlatRegion {
|
|||||||
Vector min = getMinimumPoint();
|
Vector min = getMinimumPoint();
|
||||||
Vector max = getMaximumPoint();
|
Vector max = getMaximumPoint();
|
||||||
|
|
||||||
for (int x = min.getBlockX(); x <= max.getBlockX(); ++x) {
|
for (int x = min.getBlockX() >> ChunkStore.CHUNK_SHIFTS; x <= max.getBlockX() >> ChunkStore.CHUNK_SHIFTS; ++x) {
|
||||||
for (int y = min.getBlockY(); y <= max.getBlockY(); ++y) {
|
for (int z = min.getBlockZ() >> ChunkStore.CHUNK_SHIFTS; z <= max.getBlockZ() >> ChunkStore.CHUNK_SHIFTS; ++z) {
|
||||||
for (int z = min.getBlockZ(); z <= max.getBlockZ(); ++z) {
|
for (int y = min.getBlockY() >> ChunkStore.CHUNK_SHIFTS; y <= max.getBlockY() >> ChunkStore.CHUNK_SHIFTS; ++y) {
|
||||||
chunks.add(new BlockVector(x >> ChunkStore.CHUNK_SHIFTS,
|
chunks.add(new BlockVector(x, y, z));
|
||||||
y >> ChunkStore.CHUNK_SHIFTS, z >> ChunkStore.CHUNK_SHIFTS));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren