mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
//smooth should now no longer pull water upwards.
This commit is contained in:
parent
95868514e0
commit
9e320dea6b
@ -123,14 +123,19 @@ public class HeightMap {
|
|||||||
// Depending on growing or shrinking we need to start at the bottom or top
|
// Depending on growing or shrinking we need to start at the bottom or top
|
||||||
if (newHeight > curHeight) {
|
if (newHeight > curHeight) {
|
||||||
// Set the top block of the column to be the same type (this might go wrong with rounding)
|
// Set the top block of the column to be the same type (this might go wrong with rounding)
|
||||||
session.setBlock(new Vector(X, newHeight, Z), session.getBlock(new Vector(X, curHeight, Z)));
|
BaseBlock existing = session.getBlock(new Vector(X, curHeight, Z));
|
||||||
blocksChanged++;
|
|
||||||
|
|
||||||
// Grow -- start from 1 below top replacing airblocks
|
// Skip water/lava
|
||||||
for (int y = newHeight - 1 - originY; y >= 0; y--) {
|
if (existing.getID() < 8 || existing.getID() > 11) {
|
||||||
int copyFrom = (int) (y * scale);
|
session.setBlock(new Vector(X, newHeight, Z), existing);
|
||||||
session.setBlock(new Vector(X, originY + y, Z), session.getBlock(new Vector(X, originY + copyFrom, Z)));
|
|
||||||
blocksChanged++;
|
blocksChanged++;
|
||||||
|
|
||||||
|
// Grow -- start from 1 below top replacing airblocks
|
||||||
|
for (int y = newHeight - 1 - originY; y >= 0; y--) {
|
||||||
|
int copyFrom = (int) (y * scale);
|
||||||
|
session.setBlock(new Vector(X, originY + y, Z), session.getBlock(new Vector(X, originY + copyFrom, Z)));
|
||||||
|
blocksChanged++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (curHeight > newHeight) {
|
} else if (curHeight > newHeight) {
|
||||||
// Shrink -- start from bottom
|
// Shrink -- start from bottom
|
||||||
|
Loading…
Reference in New Issue
Block a user