Use the base y as the center

This commit is contained in:
Jesse Boyd 2017-09-05 01:47:59 +10:00
parent 2649824761
commit b0b2471b73
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F
2 changed files with 4 additions and 2 deletions

View File

@ -11,6 +11,7 @@ import com.sk89q.worldedit.math.interpolation.Interpolation;
import com.sk89q.worldedit.math.transform.AffineTransform;
import com.sk89q.worldedit.math.transform.RoundedTransform;
import com.sk89q.worldedit.math.transform.Transform;
import com.sk89q.worldedit.regions.Region;
import com.sk89q.worldedit.session.ClipboardHolder;
/**
@ -67,7 +68,8 @@ public class ClipboardSpline extends Spline {
Clipboard clipboard = clipboardHolder.getClipboard();
this.originalOrigin = clipboard.getOrigin();
center = clipboard.getRegion().getCenter();
Region region = clipboard.getRegion();
center = region.getCenter().setY(region.getMinimumPoint().getY());
this.centerOffset = center.subtract(center.round());
this.center = center.subtract(centerOffset);
this.transform = transform;

View File

@ -46,7 +46,7 @@ public class SweepBrush implements Brush, ResettableTool {
boolean newPos = this.position == null || !position.equals(this.position);
this.position = position;
if (newPos) {
positions.add(position.add(0, 1, 0));
positions.add(position);
return;
}