mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-10 06:38:35 +00:00
Reformat, fix RichParser suggestions
This commit is contained in:
@ -94,32 +94,32 @@ public class AngleMask extends SolidBlockMask implements ResettableMask {
|
||||
boolean aboveMin;
|
||||
lastY = y;
|
||||
slope =
|
||||
Math.abs(getHeight(extent, x + distance, y, z) - getHeight(extent, x - distance, y, z))
|
||||
* ADJACENT_MOD;
|
||||
Math.abs(getHeight(extent, x + distance, y, z) - getHeight(extent, x - distance, y, z))
|
||||
* ADJACENT_MOD;
|
||||
if (checkFirst) {
|
||||
if (slope >= min) {
|
||||
return lastValue = true;
|
||||
}
|
||||
slope = Math.max(slope, Math.abs(
|
||||
getHeight(extent, x, y, z + distance) - getHeight(extent, x, y, z - distance))
|
||||
* ADJACENT_MOD);
|
||||
getHeight(extent, x, y, z + distance) - getHeight(extent, x, y, z - distance))
|
||||
* ADJACENT_MOD);
|
||||
slope = Math.max(slope, Math.abs(
|
||||
getHeight(extent, x + distance, y, z + distance) - getHeight(extent,
|
||||
x - distance, y, z - distance)) * DIAGONAL_MOD);
|
||||
getHeight(extent, x + distance, y, z + distance) - getHeight(extent,
|
||||
x - distance, y, z - distance)) * DIAGONAL_MOD);
|
||||
slope = Math.max(slope, Math.abs(
|
||||
getHeight(extent, x - distance, y, z + distance) - getHeight(extent,
|
||||
x + distance, y, z - distance)) * DIAGONAL_MOD);
|
||||
getHeight(extent, x - distance, y, z + distance) - getHeight(extent,
|
||||
x + distance, y, z - distance)) * DIAGONAL_MOD);
|
||||
return lastValue = (slope >= min);
|
||||
} else {
|
||||
slope = Math.max(slope, Math.abs(
|
||||
getHeight(extent, x, y, z + distance) - getHeight(extent, x, y, z - distance))
|
||||
* ADJACENT_MOD);
|
||||
getHeight(extent, x, y, z + distance) - getHeight(extent, x, y, z - distance))
|
||||
* ADJACENT_MOD);
|
||||
slope = Math.max(slope, Math.abs(
|
||||
getHeight(extent, x + distance, y, z + distance) - getHeight(extent,
|
||||
x - distance, y, z - distance)) * DIAGONAL_MOD);
|
||||
getHeight(extent, x + distance, y, z + distance) - getHeight(extent,
|
||||
x - distance, y, z - distance)) * DIAGONAL_MOD);
|
||||
slope = Math.max(slope, Math.abs(
|
||||
getHeight(extent, x - distance, y, z + distance) - getHeight(extent,
|
||||
x + distance, y, z - distance)) * DIAGONAL_MOD);
|
||||
getHeight(extent, x - distance, y, z + distance) - getHeight(extent,
|
||||
x + distance, y, z - distance)) * DIAGONAL_MOD);
|
||||
return lastValue = (slope >= min && slope <= max);
|
||||
}
|
||||
}
|
||||
|
@ -14,19 +14,19 @@ public class ROCAngleMask extends AngleMask {
|
||||
|
||||
int base = getHeight(extent, x, y, z);
|
||||
double slope =
|
||||
(getHeight(extent, x + distance, y, z) - base - (base - getHeight(extent, x - distance, y, z)))
|
||||
* ADJACENT_MOD;
|
||||
(getHeight(extent, x + distance, y, z) - base - (base - getHeight(extent, x - distance, y, z)))
|
||||
* ADJACENT_MOD;
|
||||
|
||||
double tmp = (getHeight(extent, x, y, z + distance) - base - (base - getHeight(extent, x, y,
|
||||
z - distance))) * ADJACENT_MOD;
|
||||
z - distance))) * ADJACENT_MOD;
|
||||
if (Math.abs(tmp) > Math.abs(slope)) slope = tmp;
|
||||
|
||||
tmp = (getHeight(extent, x + distance, y, z + distance) - base - (base - getHeight(extent, x - distance, y,
|
||||
z - distance))) * DIAGONAL_MOD;
|
||||
z - distance))) * DIAGONAL_MOD;
|
||||
if (Math.abs(tmp) > Math.abs(slope)) slope = tmp;
|
||||
|
||||
tmp = (getHeight(extent, x - distance, y, z + distance) - base - (base - getHeight(extent, x + distance, y,
|
||||
z - distance))) * DIAGONAL_MOD;
|
||||
z - distance))) * DIAGONAL_MOD;
|
||||
if (Math.abs(tmp) > Math.abs(slope)) slope = tmp;
|
||||
|
||||
return lastValue = slope >= min && slope <= max;
|
||||
|
@ -13,9 +13,9 @@ public class SurfaceMask extends AdjacentAnyMask {
|
||||
|
||||
public static AbstractExtentMask getMask(Extent extent) {
|
||||
return new BlockMaskBuilder()
|
||||
.addTypes(BlockTypes.AIR, BlockTypes.CAVE_AIR, BlockTypes.VOID_AIR)
|
||||
.addAll(b -> !b.getMaterial().isMovementBlocker())
|
||||
.build(extent);
|
||||
.addTypes(BlockTypes.AIR, BlockTypes.CAVE_AIR, BlockTypes.VOID_AIR)
|
||||
.addAll(b -> !b.getMaterial().isMovementBlocker())
|
||||
.build(extent);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user