3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-24 18:10:08 +01:00
- Added comments to help explain some of the logic of the Region/CuboidRegion filtering
Dieser Commit ist enthalten in:
IronApollo 2020-03-28 20:49:55 -04:00
Ursprung 8ffdd8a9e9
Commit 8c7d4c0cc5
2 geänderte Dateien mit 7 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -653,7 +653,7 @@ public class CuboidRegion extends AbstractRegion implements FlatRegion {
int chunkZ = chunk.getZ();
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) {
filter(chunk, filter, block, get, set, minY, maxY, full);
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);
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) {
filter(chunk, filter, block, get, set, minSection, localMinX, yStart, localMinZ, localMaxX, 15, localMaxZ, full);
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) {
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--;
}
for (int layer = minSection; layer <= maxSection; layer++) {

Datei anzeigen

@ -219,12 +219,14 @@ public interface Region extends Iterable<BlockVector3>, Cloneable, IBatchProcess
filter(chunk, filter, block, get, set, minSection, yStart, yEnd, full);
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) {
filter(chunk, filter, block, get, set, minSection, yStart, 15, full);
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) {
filter(chunk, filter, block, get, set, minSection, 0, yEnd, full);
filter(chunk, filter, block, get, set, maxSection, 0, yEnd, full);
maxSection--;
}
for (int layer = minSection; layer <= maxSection; layer++) {