From e1c0d00fc7a053cd1d49a4954f2b4a006e26144f Mon Sep 17 00:00:00 2001 From: Lennart99 <23156309+Lennart99@users.noreply.github.com> Date: Mon, 16 Sep 2024 19:23:53 +0200 Subject: [PATCH] made clonestamp brush clone blocks only above the target block (but including the target itself) --- .../com/github/kevindagame/brush/CloneStampBrush.java | 8 ++------ .../src/main/java/com/github/kevindagame/util/Shapes.java | 5 +---- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/VoxelSniperCore/src/main/java/com/github/kevindagame/brush/CloneStampBrush.java b/VoxelSniperCore/src/main/java/com/github/kevindagame/brush/CloneStampBrush.java index 4bf0e15e..b0e9e092 100644 --- a/VoxelSniperCore/src/main/java/com/github/kevindagame/brush/CloneStampBrush.java +++ b/VoxelSniperCore/src/main/java/com/github/kevindagame/brush/CloneStampBrush.java @@ -11,7 +11,6 @@ import com.github.kevindagame.voxelsniper.location.VoxelLocation; import org.jetbrains.annotations.NotNull; -import java.util.ArrayList; import java.util.List; /** @@ -22,9 +21,6 @@ */ public class CloneStampBrush extends StampBrush { - private BaseLocation startingPoint; - - /** * The clone method is used to grab a snapshot of the selected area dictated blockPositionY targetBlock.x y z v.brushSize v.voxelHeight and v.cCen. *
@@ -36,8 +32,8 @@ public class CloneStampBrush extends StampBrush { private void clone(final SnipeData v) { VoxelLocation point = getTargetBlock().getLocation().makeMutable(); point.add(0, v.getcCen(), 0); - this.startingPoint = point.makeImmutable(); - var positions = Shapes.cylinder(startingPoint, RotationAxis.Y, v.getBrushSize(), v.getVoxelHeight(), 0, false); + BaseLocation startingPoint = point.makeImmutable(); + var positions = Shapes.cylinder(startingPoint, RotationAxis.Y, v.getBrushSize(), v.getVoxelHeight(), (v.getVoxelHeight() / 2.0) - 1, false); this.clone.clear(); this.toStamp.clear(); this.sorted = false; diff --git a/VoxelSniperCore/src/main/java/com/github/kevindagame/util/Shapes.java b/VoxelSniperCore/src/main/java/com/github/kevindagame/util/Shapes.java index f64175a6..23089662 100644 --- a/VoxelSniperCore/src/main/java/com/github/kevindagame/util/Shapes.java +++ b/VoxelSniperCore/src/main/java/com/github/kevindagame/util/Shapes.java @@ -1,6 +1,5 @@ package com.github.kevindagame.util; -import com.github.kevindagame.snipe.Undo; import com.github.kevindagame.voxelsniper.block.BlockFace; import com.github.kevindagame.voxelsniper.block.IBlock; import com.github.kevindagame.voxelsniper.location.BaseLocation; @@ -81,7 +80,7 @@ public static List