mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
Make angle pattern slope a little more readable
This commit is contained in:
parent
cf0a21d312
commit
3e85369765
@ -37,30 +37,14 @@ public abstract class AnglePattern extends AbstractPattern {
|
||||
if (!block.getBlockType().getMaterial().isMovementBlocker()) {
|
||||
return -1;
|
||||
}
|
||||
int slope = Math.abs(
|
||||
extent.getNearestSurfaceTerrainBlock(x + distance, z, y, minY, maxY) - extent
|
||||
.getNearestSurfaceTerrainBlock(x - distance, z, y, minY, maxY)) * 7;
|
||||
slope += Math.abs(extent.getNearestSurfaceTerrainBlock(
|
||||
x,
|
||||
z + distance,
|
||||
y,
|
||||
minY,
|
||||
maxY
|
||||
) - extent.getNearestSurfaceTerrainBlock(x, z - distance, y, minY, maxY)) * 7;
|
||||
slope += Math.abs(extent.getNearestSurfaceTerrainBlock(
|
||||
x + distance,
|
||||
z + distance,
|
||||
y,
|
||||
minY,
|
||||
maxY
|
||||
) - extent.getNearestSurfaceTerrainBlock(x - distance, z - distance, y, minY, maxY)) * 5;
|
||||
slope += Math.abs(extent.getNearestSurfaceTerrainBlock(
|
||||
x - distance,
|
||||
z + distance,
|
||||
y,
|
||||
minY,
|
||||
maxY
|
||||
) - extent.getNearestSurfaceTerrainBlock(x + distance, z - distance, y, minY, maxY)) * 5;
|
||||
int slope = Math.abs(extent.getNearestSurfaceTerrainBlock(x + distance, z, y, minY, maxY) -
|
||||
extent.getNearestSurfaceTerrainBlock(x - distance, z, y, minY, maxY)) * 7;
|
||||
slope += Math.abs(extent.getNearestSurfaceTerrainBlock(x, z + distance, y, minY, maxY) -
|
||||
extent.getNearestSurfaceTerrainBlock(x, z - distance, y, minY, maxY)) * 7;
|
||||
slope += Math.abs(extent.getNearestSurfaceTerrainBlock(x + distance, z + distance, y, minY, maxY) -
|
||||
extent.getNearestSurfaceTerrainBlock(x - distance, z - distance, y, minY, maxY)) * 5;
|
||||
slope += Math.abs(extent.getNearestSurfaceTerrainBlock(x - distance, z + distance, y, minY, maxY) -
|
||||
extent.getNearestSurfaceTerrainBlock(x + distance, z - distance, y, minY, maxY)) * 5;
|
||||
return slope;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user