This commit is contained in:
dordsor21 2022-01-08 18:10:14 +00:00
parent 4754f660c7
commit c2f3c13a09
No known key found for this signature in database
GPG Key ID: 1E53E88969FFCF0B
2 changed files with 7 additions and 8 deletions

View File

@ -22,6 +22,7 @@ public class SurfaceSpline implements Brush {
private final double bias; private final double bias;
private final double continuity; private final double continuity;
private final double quality; private final double quality;
private final ArrayList<BlockVector3> path = new ArrayList<>();
public SurfaceSpline(double tension, double bias, double continuity, double quality) { public SurfaceSpline(double tension, double bias, double continuity, double quality) {
this.tension = tension; this.tension = tension;
@ -30,8 +31,6 @@ public class SurfaceSpline implements Brush {
this.quality = quality; this.quality = quality;
} }
private final ArrayList<BlockVector3> path = new ArrayList<>();
@Override @Override
public void build(EditSession editSession, BlockVector3 pos, Pattern pattern, double radius) throws public void build(EditSession editSession, BlockVector3 pos, Pattern pattern, double radius) throws
MaxChangedBlocksException { MaxChangedBlocksException {
@ -90,7 +89,6 @@ public class SurfaceSpline implements Brush {
final int ceilrad = (int) Math.ceil(radius); final int ceilrad = (int) Math.ceil(radius);
for (BlockVector3 v : vset) { for (BlockVector3 v : vset) {
final int tipx = v.getBlockX(); final int tipx = v.getBlockX();
final int tipy = v.getBlockY();
final int tipz = v.getBlockZ(); final int tipz = v.getBlockZ();
for (int loopx = tipx - ceilrad; loopx <= tipx + ceilrad; loopx++) { for (int loopx = tipx - ceilrad; loopx <= tipx + ceilrad; loopx++) {
for (int loopz = tipz - ceilrad; loopz <= tipz + ceilrad; loopz++) { for (int loopz = tipz - ceilrad; loopz <= tipz + ceilrad; loopz++) {
@ -105,8 +103,8 @@ public class SurfaceSpline implements Brush {
} }
} }
editSession.setBlocks(newSet, pattern); editSession.setBlocks(newSet, pattern);
path.clear();
} }
path.clear();
if (editSession.getActor() != null) { if (editSession.getActor() != null) {
editSession.getActor().print(Caption.of("fawe.worldedit.brush.spline.secondary")); editSession.getActor().print(Caption.of("fawe.worldedit.brush.spline.secondary"));
} }

View File

@ -52,7 +52,6 @@ import com.fastasyncworldedit.core.math.MutableBlockVector3;
import com.fastasyncworldedit.core.math.MutableVector3; import com.fastasyncworldedit.core.math.MutableVector3;
import com.fastasyncworldedit.core.math.random.SimplexNoise; import com.fastasyncworldedit.core.math.random.SimplexNoise;
import com.fastasyncworldedit.core.queue.implementation.preloader.Preloader; import com.fastasyncworldedit.core.queue.implementation.preloader.Preloader;
import com.fastasyncworldedit.core.regions.RegionWrapper;
import com.fastasyncworldedit.core.util.ExtentTraverser; import com.fastasyncworldedit.core.util.ExtentTraverser;
import com.fastasyncworldedit.core.util.MaskTraverser; import com.fastasyncworldedit.core.util.MaskTraverser;
import com.fastasyncworldedit.core.util.MathMan; import com.fastasyncworldedit.core.util.MathMan;
@ -61,7 +60,6 @@ import com.fastasyncworldedit.core.util.task.RunnableVal;
import com.sk89q.worldedit.entity.BaseEntity; import com.sk89q.worldedit.entity.BaseEntity;
import com.sk89q.worldedit.entity.Entity; import com.sk89q.worldedit.entity.Entity;
import com.sk89q.worldedit.entity.Player; import com.sk89q.worldedit.entity.Player;
import com.sk89q.worldedit.event.extent.EditSessionEvent;
import com.sk89q.worldedit.extension.platform.Actor; import com.sk89q.worldedit.extension.platform.Actor;
import com.sk89q.worldedit.extent.AbstractDelegateExtent; import com.sk89q.worldedit.extent.AbstractDelegateExtent;
import com.sk89q.worldedit.extent.ChangeSetExtent; import com.sk89q.worldedit.extent.ChangeSetExtent;
@ -137,7 +135,6 @@ import com.sk89q.worldedit.util.Location;
import com.sk89q.worldedit.util.SideEffectSet; import com.sk89q.worldedit.util.SideEffectSet;
import com.sk89q.worldedit.util.TreeGenerator; import com.sk89q.worldedit.util.TreeGenerator;
import com.sk89q.worldedit.util.collection.BlockMap; import com.sk89q.worldedit.util.collection.BlockMap;
import com.sk89q.worldedit.util.eventbus.EventBus;
import com.sk89q.worldedit.util.formatting.text.TextComponent; import com.sk89q.worldedit.util.formatting.text.TextComponent;
import com.sk89q.worldedit.world.World; import com.sk89q.worldedit.world.World;
import com.sk89q.worldedit.world.biome.BiomeType; import com.sk89q.worldedit.world.biome.BiomeType;
@ -149,7 +146,6 @@ import com.sk89q.worldedit.world.block.BlockTypes;
import com.sk89q.worldedit.world.registry.LegacyMapper; import com.sk89q.worldedit.world.registry.LegacyMapper;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import javax.annotation.Nonnull;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
@ -1117,6 +1113,11 @@ public class EditSession extends PassthroughExtent implements AutoCloseable {
public int setBlocks(Region region, Pattern pattern) throws MaxChangedBlocksException { public int setBlocks(Region region, Pattern pattern) throws MaxChangedBlocksException {
return this.changes = super.setBlocks(region, pattern); return this.changes = super.setBlocks(region, pattern);
} }
@Override
public int setBlocks(Set<BlockVector3> vset, Pattern pattern) {
return this.changes = super.setBlocks(vset, pattern);
}
//FAWE end //FAWE end
//FAWE start //FAWE start