Color brush invert (use negative yscale)

This commit is contained in:
Jesse Boyd 2017-03-29 15:18:51 +11:00
parent 7a939e08bb
commit f4752fe733
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F
2 changed files with 7 additions and 3 deletions

View File

@ -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;
}

View File

@ -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);