mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-11-25 03:55:35 +01:00
Color brush invert (use negative yscale)
This commit is contained in:
parent
7a939e08bb
commit
f4752fe733
@ -33,7 +33,12 @@ public class StencilBrush extends HeightBrush {
|
||||
final int cy = position.getBlockY();
|
||||
final int cz = position.getBlockZ();
|
||||
int size = (int) sizeDouble;
|
||||
|
||||
int add;
|
||||
if (yscale < 0) {
|
||||
add = 255;
|
||||
} else {
|
||||
add = 0;
|
||||
}
|
||||
int maxY = editSession.getMaxY();
|
||||
double scale = (yscale / sizeDouble) * (maxY + 1);
|
||||
final HeightMap map = getHeightMap();
|
||||
@ -59,7 +64,7 @@ public class StencilBrush extends HeightBrush {
|
||||
}
|
||||
}
|
||||
double raise = map.getHeight(dx, dz);
|
||||
int val = (int) Math.ceil(raise * scale);
|
||||
int val = (int) Math.ceil(raise * scale) + add;
|
||||
if (val <= cutoff) {
|
||||
return true;
|
||||
}
|
||||
|
@ -314,7 +314,6 @@ public class EditSession extends AbstractWorld implements HasFaweQueue, Lighting
|
||||
if (this.blockBag != null && limit.INVENTORY_MODE > 0) {
|
||||
changeSet = new BlockBagChangeSet(changeSet, blockBag, limit.INVENTORY_MODE == 1);
|
||||
}
|
||||
System.out.println("Combine stages " + combineStages);
|
||||
if (combineStages) {
|
||||
changeTask = changeSet;
|
||||
changeSet.addChangeTask(queue);
|
||||
|
Loading…
Reference in New Issue
Block a user