mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-04 03:56:41 +00:00
Improve notes on getting the stored section range/refactor method name
This commit is contained in:
@ -744,7 +744,7 @@ public class CuboidRegion extends AbstractRegion implements FlatRegion {
|
||||
|
||||
if (bx >= minX && tx <= maxX && bz >= minZ && tz <= maxZ) {
|
||||
// contains all X/Z
|
||||
if (minY <= set.getMinSectionIndex() << 4 && maxY >= (set.getMaxSectionIndex() << 4) + 15) {
|
||||
if (minY <= set.getMinSectionPosition() << 4 && maxY >= (set.getMaxSectionPosition() << 4) + 15) {
|
||||
return set;
|
||||
}
|
||||
trimY(set, minY, maxY);
|
||||
@ -752,7 +752,7 @@ public class CuboidRegion extends AbstractRegion implements FlatRegion {
|
||||
return set;
|
||||
}
|
||||
if (tx >= minX && bx <= maxX && tz >= minZ && bz <= maxZ) {
|
||||
if (minY > set.getMinSectionIndex() << 4 || maxY < (set.getMaxSectionIndex() << 4) + 15) {
|
||||
if (minY > set.getMinSectionPosition() << 4 || maxY < (set.getMaxSectionPosition() << 4) + 15) {
|
||||
trimY(set, minY, maxY);
|
||||
}
|
||||
final int lowerX = Math.max(0, minX - bx);
|
||||
@ -767,7 +767,7 @@ public class CuboidRegion extends AbstractRegion implements FlatRegion {
|
||||
boolean trimX = lowerX != 0 || upperX != 15;
|
||||
boolean trimZ = lowerZ != 0 || upperZ != 15;
|
||||
|
||||
for (int layer = get.getMinSectionIndex(); layer < get.getMaxSectionIndex(); layer++) {
|
||||
for (int layer = get.getMinSectionPosition(); layer < get.getMaxSectionPosition(); layer++) {
|
||||
if (set.hasSection(layer)) {
|
||||
char[] arr = set.load(layer);
|
||||
if (trimX || trimZ) {
|
||||
|
@ -244,8 +244,8 @@ public interface Region extends Iterable<BlockVector3>, Cloneable, IBatchProcess
|
||||
final IChunkSet set,
|
||||
boolean full
|
||||
) {
|
||||
int minSection = Math.max(get.getMinSectionIndex(), getMinimumY() >> 4);
|
||||
int maxSection = Math.min(get.getMaxSectionIndex(), getMaximumY() >> 4);
|
||||
int minSection = Math.max(get.getMinSectionPosition(), getMinimumY() >> 4);
|
||||
int maxSection = Math.min(get.getMaxSectionPosition(), getMaximumY() >> 4);
|
||||
block = block.initChunk(chunk.getX(), chunk.getZ());
|
||||
for (int layer = minSection; layer <= maxSection; layer++) {
|
||||
if ((!full && !set.hasSection(layer)) || !filter.appliesLayer(chunk, layer)) {
|
||||
|
Reference in New Issue
Block a user