geforkt von Mirrors/FastAsyncWorldEdit
Fix #377
- Added comments to help explain some of the logic of the Region/CuboidRegion filtering
Dieser Commit ist enthalten in:
Ursprung
8ffdd8a9e9
Commit
8c7d4c0cc5
@ -653,7 +653,7 @@ public class CuboidRegion extends AbstractRegion implements FlatRegion {
|
|||||||
int chunkZ = chunk.getZ();
|
int chunkZ = chunk.getZ();
|
||||||
block = block.initChunk(chunkX, chunkZ);
|
block = block.initChunk(chunkX, chunkZ);
|
||||||
|
|
||||||
|
//Chunk entry is an "interior chunk" in regards to the entire region, so filter the chunk whole instead of partially
|
||||||
if ((minX + 15) >> 4 <= chunkX && (maxX - 15) >> 4 >= chunkX && (minZ + 15) >> 4 <= chunkZ && (maxZ - 15) >> 4 >= chunkZ) {
|
if ((minX + 15) >> 4 <= chunkX && (maxX - 15) >> 4 >= chunkX && (minZ + 15) >> 4 <= chunkZ && (maxZ - 15) >> 4 >= chunkZ) {
|
||||||
filter(chunk, filter, block, get, set, minY, maxY, full);
|
filter(chunk, filter, block, get, set, minY, maxY, full);
|
||||||
return;
|
return;
|
||||||
@ -672,12 +672,14 @@ public class CuboidRegion extends AbstractRegion implements FlatRegion {
|
|||||||
filter(chunk, filter, block, get, set, minSection, localMinX, yStart, localMinZ, localMaxX, yEnd, localMaxZ, full);
|
filter(chunk, filter, block, get, set, minSection, localMinX, yStart, localMinZ, localMaxX, yEnd, localMaxZ, full);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
//If the yStart is not 0, the edit is smaller than the height of a ChunkSection, so filter individually and remove section as the minSection layer entry
|
||||||
if (yStart != 0) {
|
if (yStart != 0) {
|
||||||
filter(chunk, filter, block, get, set, minSection, localMinX, yStart, localMinZ, localMaxX, 15, localMaxZ, full);
|
filter(chunk, filter, block, get, set, minSection, localMinX, yStart, localMinZ, localMaxX, 15, localMaxZ, full);
|
||||||
minSection++;
|
minSection++;
|
||||||
}
|
}
|
||||||
|
//If the yEnd is not 15, the edit is smaller than the height of a ChunkSection, so filter individually and remove section as the maxSection layer entry
|
||||||
if (yEnd != 15) {
|
if (yEnd != 15) {
|
||||||
filter(chunk, filter, block, get, set, minSection, localMinX, 0, localMinZ, localMaxX, yEnd, localMaxZ, full);
|
filter(chunk, filter, block, get, set, maxSection, localMinX, 0, localMinZ, localMaxX, yEnd, localMaxZ, full);
|
||||||
maxSection--;
|
maxSection--;
|
||||||
}
|
}
|
||||||
for (int layer = minSection; layer <= maxSection; layer++) {
|
for (int layer = minSection; layer <= maxSection; layer++) {
|
||||||
|
@ -219,12 +219,14 @@ public interface Region extends Iterable<BlockVector3>, Cloneable, IBatchProcess
|
|||||||
filter(chunk, filter, block, get, set, minSection, yStart, yEnd, full);
|
filter(chunk, filter, block, get, set, minSection, yStart, yEnd, full);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
//If the yStart is not 0, the edit is smaller than the height of a ChunkSection, so filter individually and remove section as the minSection layer entry
|
||||||
if (yStart != 0) {
|
if (yStart != 0) {
|
||||||
filter(chunk, filter, block, get, set, minSection, yStart, 15, full);
|
filter(chunk, filter, block, get, set, minSection, yStart, 15, full);
|
||||||
minSection++;
|
minSection++;
|
||||||
}
|
}
|
||||||
|
//If the yEnd is not 15, the edit is smaller than the height of a ChunkSection, so filter individually and remove section as the maxSection layer entry
|
||||||
if (yEnd != 15) {
|
if (yEnd != 15) {
|
||||||
filter(chunk, filter, block, get, set, minSection, 0, yEnd, full);
|
filter(chunk, filter, block, get, set, maxSection, 0, yEnd, full);
|
||||||
maxSection--;
|
maxSection--;
|
||||||
}
|
}
|
||||||
for (int layer = minSection; layer <= maxSection; layer++) {
|
for (int layer = minSection; layer <= maxSection; layer++) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren