mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-04 12:06:41 +00:00
Update to PlotSquared-we branch
This commit is contained in:
@ -131,8 +131,8 @@ public class CuboidRegion extends AbstractRegion implements FlatRegion {
|
||||
if (pos1 == null || pos2 == null) {
|
||||
return;
|
||||
}
|
||||
pos1 = pos1.clampY(world == null ? Integer.MIN_VALUE : 0, world == null ? Integer.MAX_VALUE : world.getMaxY());
|
||||
pos2 = pos2.clampY(world == null ? Integer.MIN_VALUE : 0, world == null ? Integer.MAX_VALUE : world.getMaxY());
|
||||
pos1 = pos1.clampY(world == null ? 0 : 0, world == null ? FaweCache.IMP.WORLD_MAX_Y : world.getMaxY());
|
||||
pos2 = pos2.clampY(world == null ? 0 : 0, world == null ? FaweCache.IMP.WORLD_MAX_Y : world.getMaxY());
|
||||
minX = Math.min(pos1.getX(), pos2.getX());
|
||||
minY = Math.min(pos1.getY(), pos2.getY());
|
||||
minZ = Math.min(pos1.getZ(), pos2.getZ());
|
||||
@ -196,16 +196,6 @@ public class CuboidRegion extends AbstractRegion implements FlatRegion {
|
||||
return max;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMinimumY() {
|
||||
return minY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaximumY() {
|
||||
return maxY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void expand(BlockVector3... changes) {
|
||||
checkNotNull(changes);
|
||||
@ -655,15 +645,31 @@ public class CuboidRegion extends AbstractRegion implements FlatRegion {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMinY() {
|
||||
public int getMinimumY() {
|
||||
return minY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxY() {
|
||||
public int getMaximumY() {
|
||||
return maxY;
|
||||
}
|
||||
|
||||
public int getMinimumX() {
|
||||
return minX;
|
||||
}
|
||||
|
||||
public int getMinimumZ() {
|
||||
return minZ;
|
||||
}
|
||||
|
||||
public int getMaximumX() {
|
||||
return maxX;
|
||||
}
|
||||
|
||||
public int getMaximumZ() {
|
||||
return maxZ;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void filter(final IChunk chunk, final Filter filter, ChunkFilterBlock block, final IChunkGet get, final IChunkSet set) {
|
||||
int chunkX = chunk.getX();
|
||||
|
@ -385,16 +385,6 @@ public class CylinderRegion extends AbstractRegion implements FlatRegion {
|
||||
return Polygons.polygonizeCylinder(center, radius, maxPoints);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMinY() {
|
||||
return minY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxY() {
|
||||
return maxY;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a new instance with the given center and radius in the X and Z
|
||||
* axes with a Y that extends from the bottom of the extent to the top
|
||||
|
@ -195,17 +195,17 @@ public interface Region extends Iterable<BlockVector3>, Cloneable, IBatchProcess
|
||||
*/
|
||||
List<BlockVector2> polygonize(int maxPoints);
|
||||
|
||||
default int getMinY() {
|
||||
default int getMinimumY() {
|
||||
return getMinimumPoint().getY();
|
||||
}
|
||||
|
||||
default int getMaxY() {
|
||||
default int getMaximumY() {
|
||||
return getMaximumPoint().getY();
|
||||
}
|
||||
|
||||
default void filter(final IChunk chunk, final Filter filter, ChunkFilterBlock block, final IChunkGet get, final IChunkSet set) {
|
||||
int minSection = Math.max(0, getMinY() >> 4);
|
||||
int maxSection = Math.min(15, getMaxY() >> 4);
|
||||
int minSection = Math.max(0, getMinimumY() >> 4);
|
||||
int maxSection = Math.min(15, getMaximumY() >> 4);
|
||||
for (int layer = minSection; layer <= maxSection; layer++) {
|
||||
if (!get.hasSection(layer) || !filter.appliesLayer(chunk, layer)) return;
|
||||
block = block.init(get, set, layer);
|
||||
|
Reference in New Issue
Block a user