Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-07 12:00:07 +01:00
As Jesse would say... *
Dieser Commit ist enthalten in:
Ursprung
9d1117303c
Commit
0313320816
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
This file is part of VoxelSniper, licensed under the MIT License (MIT).
|
||||
|
||||
Copyright (c) The VoxelBox <http://thevoxelbox.com>
|
||||
|
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
This file is part of VoxelSniper, licensed under the MIT License (MIT).
|
||||
|
||||
Copyright (c) The VoxelBox <http://thevoxelbox.com>
|
||||
@ -33,9 +33,6 @@ import org.bukkit.ChatColor;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
/**
|
||||
* @author Piotr
|
||||
*/
|
||||
public class SnipeData {
|
||||
|
||||
public static final int DEFAULT_REPLACE_DATA_VALUE = 0;
|
||||
@ -87,9 +84,6 @@ public class SnipeData {
|
||||
private Pattern pattern;
|
||||
private String patternInfo;
|
||||
|
||||
/**
|
||||
* @param vs
|
||||
*/
|
||||
public SnipeData(final Sniper vs) {
|
||||
this.owner = vs;
|
||||
}
|
||||
@ -219,9 +213,6 @@ public class SnipeData {
|
||||
this.voxelList = new VoxelList();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param message
|
||||
*/
|
||||
public final void sendMessage(final String message) {
|
||||
this.owner.getPlayer().sendMessage(message);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
This file is part of VoxelSniper, licensed under the MIT License (MIT).
|
||||
|
||||
Copyright (c) The VoxelBox <http://thevoxelbox.com>
|
||||
|
@ -17,9 +17,7 @@ import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author Voxel
|
||||
*/
|
||||
|
||||
public class VoxelSniperListener implements Listener {
|
||||
|
||||
private static final String SNIPER_PERMISSION = "voxelsniper.sniper";
|
||||
|
@ -8,6 +8,7 @@ import org.bukkit.ChatColor;
|
||||
|
||||
/**
|
||||
* A brush that creates a solid ball.
|
||||
*
|
||||
* @author Piotr
|
||||
*/
|
||||
public class BallBrush extends PerformBrush {
|
||||
@ -15,10 +16,7 @@ public class BallBrush extends PerformBrush {
|
||||
public static final int TRUE_CIRCLE_OFF_VALUE = 0;
|
||||
private double trueCircle = 0;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public BallBrush() {
|
||||
public BallBrush() {
|
||||
this.setName("Ball");
|
||||
}
|
||||
|
||||
|
@ -9,6 +9,7 @@ import org.bukkit.block.Block;
|
||||
public class BiomeBrush extends Brush {
|
||||
|
||||
private Biome selectedBiome = Biome.PLAINS;
|
||||
|
||||
public BiomeBrush() {
|
||||
this.setName("Biome (/b biome [Biome Name])");
|
||||
}
|
||||
@ -72,7 +73,7 @@ public class BiomeBrush extends Brush {
|
||||
}
|
||||
|
||||
availableBiomes.append(ChatColor.RED + ", " + ChatColor.DARK_GREEN)
|
||||
.append(biome.name());
|
||||
.append(biome.name());
|
||||
|
||||
}
|
||||
v.sendMessage(ChatColor.DARK_BLUE + "Available biomes: " + availableBiomes);
|
||||
|
@ -35,7 +35,7 @@ public class BlendBallBrush extends BlendBrushBase {
|
||||
for (int x = 0; x <= brushSizeDoubled; x++) {
|
||||
for (int y = 0; y <= brushSizeDoubled; y++) {
|
||||
System.arraycopy(oldMaterials[x + 1][y + 1], 1, newMaterials[x][y], 0,
|
||||
brushSizeDoubled + 1);
|
||||
brushSizeDoubled + 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -85,7 +85,7 @@ public class BlendBallBrush extends BlendBrushBase {
|
||||
final Undo undo = new Undo();
|
||||
final double rSquared = Math.pow(brushSize + 1, 2);
|
||||
|
||||
// Make the changes
|
||||
// Make the changes
|
||||
for (int x = brushSizeDoubled; x >= 0; x--) {
|
||||
final double xSquared = Math.pow(x - brushSize - 1, 2);
|
||||
|
||||
|
@ -4,17 +4,10 @@ import com.thevoxelbox.voxelsniper.Message;
|
||||
import com.thevoxelbox.voxelsniper.SnipeData;
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
/**
|
||||
* @author Monofraps
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public abstract class BlendBrushBase extends Brush {
|
||||
protected boolean excludeAir = true;
|
||||
protected boolean excludeWater = true;
|
||||
|
||||
/**
|
||||
* @param v
|
||||
*/
|
||||
protected abstract void blend(final SnipeData v);
|
||||
|
||||
@Override
|
||||
@ -47,30 +40,18 @@ public abstract class BlendBrushBase extends Brush {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
*/
|
||||
protected final boolean isExcludeAir() {
|
||||
return excludeAir;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param excludeAir
|
||||
*/
|
||||
protected final void setExcludeAir(boolean excludeAir) {
|
||||
this.excludeAir = excludeAir;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
*/
|
||||
protected final boolean isExcludeWater() {
|
||||
return excludeWater;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param excludeWater
|
||||
*/
|
||||
protected final void setExcludeWater(boolean excludeWater) {
|
||||
this.excludeWater = excludeWater;
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ public class BlendVoxelBrush extends BlendBrushBase {
|
||||
for (int x = 0; x <= brushSizeDoubled; x++) {
|
||||
for (int y = 0; y <= brushSizeDoubled; y++) {
|
||||
System.arraycopy(oldMaterials[x + 1][y + 1], 1, newMaterials[x][y], 0,
|
||||
brushSizeDoubled + 1);
|
||||
brushSizeDoubled + 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7,9 +7,6 @@ import org.bukkit.ChatColor;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* @author Giltwist
|
||||
*/
|
||||
public class BlobBrush extends PerformBrush {
|
||||
private static final int GROW_PERCENT_DEFAULT = 1000;
|
||||
private static final int GROW_PERCENT_MIN = 1;
|
||||
@ -96,7 +93,7 @@ public class BlobBrush extends PerformBrush {
|
||||
|
||||
final double rSquared = Math.pow(brushSize + 1, 2);
|
||||
|
||||
// Make the changes
|
||||
// Make the changes
|
||||
for (int x = brushSizeDoubled; x >= 0; x--) {
|
||||
final double xSquared = Math.pow(x - brushSize - 1, 2);
|
||||
|
||||
|
@ -7,9 +7,6 @@ import org.bukkit.block.Block;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* @author MikeMatrix
|
||||
*/
|
||||
public class BlockResetBrush extends Brush {
|
||||
private static final ArrayList<Material> DENIED_UPDATES = new ArrayList<>();
|
||||
|
||||
|
@ -9,29 +9,26 @@ import com.thevoxelbox.voxelsniper.SnipeData;
|
||||
import org.bukkit.Material;
|
||||
|
||||
/**
|
||||
This brush only looks for solid blocks, and then changes those plus any air blocks touching them. If it works, this brush should be faster than the original
|
||||
blockPositionY an amount proportional to the volume of a snipe selection area / the number of blocks touching air in the selection. This is because every solid block
|
||||
surrounded blockPositionY others should take equally long to check and not change as it would take MC to change them and then check and find no lighting to update. For
|
||||
air blocks surrounded blockPositionY other air blocks, this brush saves about 80-100 checks blockPositionY not updating them or their lighting. And for air blocks touching solids,
|
||||
this brush is slower, because it replaces the air once per solid block it is touching. I assume on average this is about 2 blocks. So every air block
|
||||
touching a solid negates one air block floating in air. Thus, for selections that have more air blocks surrounded blockPositionY air than air blocks touching solids,
|
||||
this brush will be faster, which is almost always the case, especially for undeveloped terrain and for larger brush sizes (unlike the original brush, this
|
||||
should only slow down blockPositionY the square of the brush size, not the cube of the brush size). For typical terrain, blockPositionY my calculations, overall speed increase is
|
||||
about a factor of 5-6 for a size 20 brush. For a complicated city or ship, etc., this may be only a factor of about 2. In a hypothetical worst case scenario
|
||||
of a 3d checkerboard of stone and air every other block, this brush should only be about 1.5x slower than the original brush. Savings increase for larger
|
||||
brushes.
|
||||
* This brush only looks for solid blocks, and then changes those plus any air blocks touching them. If it works, this brush should be faster than the original
|
||||
* blockPositionY an amount proportional to the volume of a snipe selection area / the number of blocks touching air in the selection. This is because every solid block
|
||||
* surrounded blockPositionY others should take equally long to check and not change as it would take MC to change them and then check and find no lighting to update. For
|
||||
* air blocks surrounded blockPositionY other air blocks, this brush saves about 80-100 checks blockPositionY not updating them or their lighting. And for air blocks touching solids,
|
||||
* this brush is slower, because it replaces the air once per solid block it is touching. I assume on average this is about 2 blocks. So every air block
|
||||
* touching a solid negates one air block floating in air. Thus, for selections that have more air blocks surrounded blockPositionY air than air blocks touching solids,
|
||||
* this brush will be faster, which is almost always the case, especially for undeveloped terrain and for larger brush sizes (unlike the original brush, this
|
||||
* should only slow down blockPositionY the square of the brush size, not the cube of the brush size). For typical terrain, blockPositionY my calculations, overall speed increase is
|
||||
* about a factor of 5-6 for a size 20 brush. For a complicated city or ship, etc., this may be only a factor of about 2. In a hypothetical worst case scenario
|
||||
* of a 3d checkerboard of stone and air every other block, this brush should only be about 1.5x slower than the original brush. Savings increase for larger
|
||||
* brushes.
|
||||
*
|
||||
* @author GavJenks
|
||||
*/
|
||||
public class BlockResetSurfaceBrush extends Brush {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
public BlockResetSurfaceBrush() {
|
||||
this.setName("Block Reset Brush Surface Only");
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private void applyBrush(final SnipeData v) {
|
||||
final AsyncWorld world = this.getWorld();
|
||||
|
||||
|
@ -123,7 +123,7 @@ public abstract class Brush implements IBrush {
|
||||
} else {
|
||||
RangeBlockHelper rangeBlockHelper;
|
||||
if (v.owner().getSnipeData(v.owner().getCurrentToolId()).isRanged()) {
|
||||
rangeBlockHelper = new RangeBlockHelper(v.owner().getPlayer(), v.owner().getWorld(), (double) v.owner().getSnipeData(v.owner().getCurrentToolId()).getRange());
|
||||
rangeBlockHelper = new RangeBlockHelper(v.owner().getPlayer(), v.owner().getWorld(), v.owner().getSnipeData(v.owner().getCurrentToolId()).getRange());
|
||||
this.setTargetBlock(rangeBlockHelper.getRangeBlock());
|
||||
} else {
|
||||
rangeBlockHelper = new RangeBlockHelper(v.owner().getPlayer(), v.owner().getWorld());
|
||||
@ -190,7 +190,6 @@ public abstract class Brush implements IBrush {
|
||||
* @param z Z coordinate
|
||||
* @return Type ID of Block at given coordinates in the world of the targeted Block.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
protected int getBlockIdAt(int x, int y, int z) {
|
||||
return getWorld().getBlockAt(x, y, z).getTypeId();
|
||||
}
|
||||
|
@ -11,9 +11,7 @@ import org.bukkit.Chunk;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
|
||||
/**
|
||||
* @author Voxel
|
||||
*/
|
||||
|
||||
public class CanyonBrush extends Brush {
|
||||
private static final int SHIFT_LEVEL_MIN = 10;
|
||||
private static final int SHIFT_LEVEL_MAX = 60;
|
||||
@ -23,10 +21,6 @@ public class CanyonBrush extends Brush {
|
||||
this.setName("Canyon");
|
||||
}
|
||||
|
||||
/**
|
||||
* @param chunk
|
||||
* @param undo
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
protected final void canyon(final AsyncChunk chunk, final Undo undo) {
|
||||
for (int x = 0; x < CHUNK_SIZE; x++) {
|
||||
|
@ -6,9 +6,7 @@ import com.thevoxelbox.voxelsniper.Undo;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Chunk;
|
||||
|
||||
/**
|
||||
* @author Voxel
|
||||
*/
|
||||
|
||||
public class CanyonSelectionBrush extends CanyonBrush {
|
||||
private boolean first = true;
|
||||
private int fx;
|
||||
|
@ -6,9 +6,6 @@ import com.thevoxelbox.voxelsniper.brush.perform.PerformBrush;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.block.Block;
|
||||
|
||||
/**
|
||||
* @author MikeMatrix
|
||||
*/
|
||||
public class CheckerVoxelDiscBrush extends PerformBrush {
|
||||
private boolean useWorldCoordinates = true;
|
||||
|
||||
@ -19,10 +16,6 @@ public class CheckerVoxelDiscBrush extends PerformBrush {
|
||||
this.setName("Checker Voxel Disc");
|
||||
}
|
||||
|
||||
/**
|
||||
* @param v Snipe Data
|
||||
* @param target
|
||||
*/
|
||||
private void applyBrush(final SnipeData v, final Block target) {
|
||||
for (int x = v.getBrushSize(); x >= -v.getBrushSize(); x--) {
|
||||
for (int y = v.getBrushSize(); y >= -v.getBrushSize(); y--) {
|
||||
|
@ -7,9 +7,6 @@ import com.thevoxelbox.voxelsniper.Undo;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
|
||||
/**
|
||||
* @author psanker
|
||||
*/
|
||||
public class CleanSnowBrush extends Brush {
|
||||
private double trueCircle = 0;
|
||||
|
||||
|
@ -6,13 +6,11 @@ import org.bukkit.ChatColor;
|
||||
|
||||
/**
|
||||
* The CloneStamp class is used to create a collection of blocks in a cylinder shape according to the selection the player has set.
|
||||
*
|
||||
* @author Voxel
|
||||
*/
|
||||
public class CloneStampBrush extends StampBrush {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public CloneStampBrush() {
|
||||
public CloneStampBrush() {
|
||||
this.setName("Clone");
|
||||
}
|
||||
|
||||
@ -107,7 +105,7 @@ public class CloneStampBrush extends StampBrush {
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void parameters(final String[] par, final com.thevoxelbox.voxelsniper.SnipeData v) {
|
||||
public final void parameters(final String[] par, final SnipeData v) {
|
||||
final String parameter = par[1];
|
||||
|
||||
if (parameter.equalsIgnoreCase("info")) {
|
||||
|
@ -8,11 +8,6 @@ import org.bukkit.entity.LargeFireball;
|
||||
import org.bukkit.entity.SmallFireball;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
/**
|
||||
* @author Gavjenks Heavily revamped from ruler brush blockPositionY
|
||||
* @author Giltwist
|
||||
* @author Monofraps (Merged Meteor brush)
|
||||
*/
|
||||
public class CometBrush extends Brush {
|
||||
private boolean useBigBalls = false;
|
||||
|
||||
|
@ -7,9 +7,6 @@ import com.thevoxelbox.voxelsniper.SnipeData;
|
||||
import com.thevoxelbox.voxelsniper.Undo;
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
/**
|
||||
* @author giltwist
|
||||
*/
|
||||
public class CopyPastaBrush extends Brush {
|
||||
private static final int BLOCK_LIMIT = 10000;
|
||||
|
||||
@ -23,13 +20,12 @@ public class CopyPastaBrush extends Brush {
|
||||
private int[] offsetPoint = new int[3];
|
||||
private int[] blockArray;
|
||||
private int[] arraySize = new int[3];
|
||||
private int pivot = 0; // ccw degrees
|
||||
private int pivot = 0; // ccw degrees
|
||||
|
||||
public CopyPastaBrush() {
|
||||
this.setName("CopyPasta");
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private void doCopy(final SnipeData v) {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
this.arraySize[i] = Math.abs(this.firstPoint[i] - this.secondPoint[i]) + 1;
|
||||
@ -98,7 +94,7 @@ public class CopyPastaBrush extends Brush {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final void arrow(final com.thevoxelbox.voxelsniper.SnipeData v) {
|
||||
protected final void arrow(final SnipeData v) {
|
||||
switch (this.points) {
|
||||
case 0:
|
||||
this.firstPoint[0] = this.getTargetBlock().getX();
|
||||
@ -126,7 +122,7 @@ public class CopyPastaBrush extends Brush {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final void powder(final com.thevoxelbox.voxelsniper.SnipeData v) {
|
||||
protected final void powder(final SnipeData v) {
|
||||
if (this.points == 2) {
|
||||
if (this.numBlocks == 0) {
|
||||
this.doCopy(v);
|
||||
@ -151,7 +147,7 @@ public class CopyPastaBrush extends Brush {
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void parameters(final String[] par, final com.thevoxelbox.voxelsniper.SnipeData v) {
|
||||
public final void parameters(final String[] par, final SnipeData v) {
|
||||
final String parameter = par[1];
|
||||
|
||||
if (parameter.equalsIgnoreCase("info")) {
|
||||
|
@ -6,9 +6,6 @@ import com.thevoxelbox.voxelsniper.brush.perform.PerformBrush;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.block.Block;
|
||||
|
||||
/**
|
||||
* @author Kavutop
|
||||
*/
|
||||
public class CylinderBrush extends PerformBrush {
|
||||
private double trueCircle = 0;
|
||||
|
||||
|
@ -7,9 +7,6 @@ import org.bukkit.ChatColor;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
/**
|
||||
* @author Voxel
|
||||
*/
|
||||
public class DiscBrush extends PerformBrush {
|
||||
private double trueCircle = 0;
|
||||
|
||||
|
@ -7,9 +7,6 @@ import com.thevoxelbox.voxelsniper.brush.perform.PerformBrush;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.block.BlockFace;
|
||||
|
||||
/**
|
||||
* @author Voxel
|
||||
*/
|
||||
public class DiscFaceBrush extends PerformBrush {
|
||||
private double trueCircle = 0;
|
||||
|
||||
|
@ -11,10 +11,6 @@ import org.bukkit.util.Vector;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author Gavjenks
|
||||
* @author MikeMatrix
|
||||
*/
|
||||
public class DomeBrush extends Brush {
|
||||
|
||||
public DomeBrush() {
|
||||
|
@ -6,10 +6,6 @@ import com.thevoxelbox.voxelsniper.SnipeData;
|
||||
import com.thevoxelbox.voxelsniper.Undo;
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
/**
|
||||
* @author Gavjenks
|
||||
* @author psanker
|
||||
*/
|
||||
public class DrainBrush extends Brush {
|
||||
private double trueCircle = 0;
|
||||
private boolean disc = false;
|
||||
@ -18,7 +14,6 @@ public class DrainBrush extends Brush {
|
||||
this.setName("Drain");
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private void drain(final SnipeData v) {
|
||||
final int brushSize = v.getBrushSize();
|
||||
final double brushSizeSquared = Math.pow(brushSize + this.trueCircle, 2);
|
||||
|
@ -6,9 +6,6 @@ import com.thevoxelbox.voxelsniper.SnipeData;
|
||||
import com.thevoxelbox.voxelsniper.brush.perform.PerformBrush;
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
/**
|
||||
* @author psanker
|
||||
*/
|
||||
public class EllipseBrush extends PerformBrush {
|
||||
private static final double TWO_PI = (2 * Math.PI);
|
||||
private static final int SCL_MIN = 1;
|
||||
@ -177,7 +174,7 @@ public class EllipseBrush extends PerformBrush {
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void parameters(final String[] par, final com.thevoxelbox.voxelsniper.SnipeData v) {
|
||||
public final void parameters(final String[] par, final SnipeData v) {
|
||||
for (int i = 1; i < par.length; i++) {
|
||||
final String parameter = par[i];
|
||||
|
||||
|
@ -72,7 +72,7 @@ public class EllipsoidBrush extends PerformBrush {
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void parameters(final String[] par, final com.thevoxelbox.voxelsniper.SnipeData v) {
|
||||
public final void parameters(final String[] par, final SnipeData v) {
|
||||
this.istrue = false;
|
||||
for (int i = 1; i < par.length; i++) {
|
||||
final String parameter = par[i];
|
||||
|
@ -5,9 +5,7 @@ import com.thevoxelbox.voxelsniper.SnipeData;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.EntityType;
|
||||
|
||||
/**
|
||||
* @author Piotr
|
||||
*/
|
||||
|
||||
public class EntityBrush extends Brush {
|
||||
private EntityType entityType = EntityType.ZOMBIE;
|
||||
|
||||
|
@ -123,8 +123,8 @@ public class EntityRemovalBrush extends Brush {
|
||||
|
||||
// +#/-# will suppress auto-prefixing
|
||||
final String exemptionPattern = currentParam.startsWith("+#") || currentParam.startsWith("-#") ?
|
||||
currentParam.substring(2) :
|
||||
(currentParam.contains(".") ? currentParam.substring(1) : ".*." + currentParam.substring(1));
|
||||
currentParam.substring(2) :
|
||||
(currentParam.contains(".") ? currentParam.substring(1) : ".*." + currentParam.substring(1));
|
||||
|
||||
if (isAddOperation) {
|
||||
exemptions.add(exemptionPattern);
|
||||
|
@ -10,9 +10,7 @@ import org.bukkit.block.Block;
|
||||
import java.util.EnumSet;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author Voxel
|
||||
*/
|
||||
|
||||
public class EraserBrush extends Brush {
|
||||
|
||||
private static final Set<Material> EXCLUSIVE_MATERIALS = EnumSet.of(
|
||||
|
@ -3,50 +3,50 @@ package com.thevoxelbox.voxelsniper.brush;
|
||||
import com.thevoxelbox.voxelsniper.Message;
|
||||
import com.thevoxelbox.voxelsniper.SnipeData;
|
||||
|
||||
public class ErodeBlendBrush extends Brush{
|
||||
|
||||
private BlendBallBrush blendBall;
|
||||
private ErodeBrush erode;
|
||||
public class ErodeBlendBrush extends Brush {
|
||||
|
||||
public ErodeBlendBrush() {
|
||||
this.blendBall = new BlendBallBrush();
|
||||
this.erode = new ErodeBrush();
|
||||
this.setName("Erode BlendBall");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final void arrow(final SnipeData v) {
|
||||
this.blendBall.excludeAir = false;
|
||||
this.blendBall.setTargetBlock(this.getTargetBlock());
|
||||
this.blendBall.arrow(v);
|
||||
this.erode.setTargetBlock(this.getTargetBlock());
|
||||
this.erode.arrow(v);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final void powder(final SnipeData v) {
|
||||
this.blendBall.excludeAir = false;
|
||||
this.blendBall.setTargetBlock(this.getTargetBlock());
|
||||
this.blendBall.arrow(v);
|
||||
this.erode.setTargetBlock(this.getTargetBlock());
|
||||
this.erode.powder(v);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void parameters(final String[] par, final SnipeData v) {
|
||||
this.blendBall.parameters(par, v);
|
||||
this.erode.parameters(par, v);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPermissionNode() {
|
||||
return "voxelsniper.brush.erodeblend";
|
||||
}
|
||||
private BlendBallBrush blendBall;
|
||||
private ErodeBrush erode;
|
||||
|
||||
@Override
|
||||
public void info(Message vm) {
|
||||
this.erode.info(vm);
|
||||
this.blendBall.info(vm);
|
||||
}
|
||||
public ErodeBlendBrush() {
|
||||
this.blendBall = new BlendBallBrush();
|
||||
this.erode = new ErodeBrush();
|
||||
this.setName("Erode BlendBall");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final void arrow(final SnipeData v) {
|
||||
this.blendBall.excludeAir = false;
|
||||
this.blendBall.setTargetBlock(this.getTargetBlock());
|
||||
this.blendBall.arrow(v);
|
||||
this.erode.setTargetBlock(this.getTargetBlock());
|
||||
this.erode.arrow(v);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final void powder(final SnipeData v) {
|
||||
this.blendBall.excludeAir = false;
|
||||
this.blendBall.setTargetBlock(this.getTargetBlock());
|
||||
this.blendBall.arrow(v);
|
||||
this.erode.setTargetBlock(this.getTargetBlock());
|
||||
this.erode.powder(v);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void parameters(final String[] par, final SnipeData v) {
|
||||
this.blendBall.parameters(par, v);
|
||||
this.erode.parameters(par, v);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPermissionNode() {
|
||||
return "voxelsniper.brush.erodeblend";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void info(Message vm) {
|
||||
this.erode.info(vm);
|
||||
this.blendBall.info(vm);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -22,10 +22,6 @@ import org.bukkit.util.Vector;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @author Piotr
|
||||
* @author MikeMatrix
|
||||
*/
|
||||
public class ErodeBrush extends Brush {
|
||||
private static final Vector[] FACES_TO_CHECK = {new Vector(0, 0, 1), new Vector(0, 0, -1), new Vector(0, 1, 0), new Vector(0, -1, 0), new Vector(1, 0, 0), new Vector(-1, 0, 0)};
|
||||
private final HelpJSAP parser = new HelpJSAP("/b e", "Brush for eroding landscape.", ChatPaginator.GUARANTEED_NO_WRAP_CHAT_PAGE_WIDTH);
|
||||
@ -44,12 +40,6 @@ public class ErodeBrush extends Brush {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param result
|
||||
* @param player
|
||||
* @param helpJSAP
|
||||
* @return if a message was sent.
|
||||
*/
|
||||
public static boolean sendHelpOrErrorMessageToPlayer(final JSAPResult result, final Player player, final HelpJSAP helpJSAP) {
|
||||
final List<String> output = helpJSAP.writeHelpOrErrorMessageIfRequired(result);
|
||||
if (!output.isEmpty()) {
|
||||
@ -247,11 +237,12 @@ public class ErodeBrush extends Brush {
|
||||
return "voxelsniper.brush.erode";
|
||||
}
|
||||
|
||||
/**
|
||||
* @author MikeMatrix
|
||||
*/
|
||||
private enum Preset {
|
||||
MELT(new ErosionPreset(2, 1, 5, 1)), FILL(new ErosionPreset(5, 1, 2, 1)), SMOOTH(new ErosionPreset(3, 1, 3, 1)), LIFT(new ErosionPreset(6, 0, 1, 1)), FLOATCLEAN(new ErosionPreset(6, 1, 6, 1));
|
||||
MELT(new ErosionPreset(2, 1, 5, 1)),
|
||||
FILL(new ErosionPreset(5, 1, 2, 1)),
|
||||
SMOOTH(new ErosionPreset(3, 1, 3, 1)),
|
||||
LIFT(new ErosionPreset(6, 0, 1, 1)),
|
||||
FLOATCLEAN(new ErosionPreset(6, 1, 6, 1));
|
||||
private ErosionPreset preset;
|
||||
|
||||
Preset(final ErosionPreset preset) {
|
||||
@ -262,21 +253,20 @@ public class ErodeBrush extends Brush {
|
||||
* Generates a concat string of all options.
|
||||
*
|
||||
* @param seperator Seperator for delimiting entries.
|
||||
* @return
|
||||
*/
|
||||
public static String getValuesString(String seperator) {
|
||||
String valuesString = "";
|
||||
StringBuilder valuesString = new StringBuilder();
|
||||
|
||||
boolean delimiterHelper = true;
|
||||
for (final Preset preset : Preset.values()) {
|
||||
if (delimiterHelper) {
|
||||
delimiterHelper = false;
|
||||
} else {
|
||||
valuesString += seperator;
|
||||
valuesString.append(seperator);
|
||||
}
|
||||
valuesString += preset.name();
|
||||
valuesString.append(preset.name());
|
||||
}
|
||||
return valuesString;
|
||||
return valuesString.toString();
|
||||
}
|
||||
|
||||
public ErosionPreset getPreset() {
|
||||
@ -286,9 +276,6 @@ public class ErodeBrush extends Brush {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @author MikeMatrix
|
||||
*/
|
||||
private static final class BlockChangeTracker {
|
||||
private final Map<Integer, Map<Vector, BlockWrapper>> blockChanges;
|
||||
private final Map<Vector, BlockWrapper> flatChanges;
|
||||
@ -302,7 +289,7 @@ public class ErodeBrush extends Brush {
|
||||
}
|
||||
|
||||
public BlockWrapper get(final Vector position, final int iteration) {
|
||||
BlockWrapper changedBlock = null;
|
||||
BlockWrapper changedBlock;
|
||||
|
||||
for (int i = iteration - 1; i >= 0; --i) {
|
||||
if (this.blockChanges.containsKey(i) && this.blockChanges.get(i).containsKey(position)) {
|
||||
@ -334,16 +321,12 @@ public class ErodeBrush extends Brush {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @author MikeMatrix
|
||||
*/
|
||||
private static final class BlockWrapper {
|
||||
|
||||
private final AsyncBlock block;
|
||||
private final Material material;
|
||||
private final int data;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public BlockWrapper(final AsyncBlock block) {
|
||||
this.block = block;
|
||||
this.data = block.getPropertyId();
|
||||
@ -406,9 +389,6 @@ public class ErodeBrush extends Brush {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @author MikeMatrix
|
||||
*/
|
||||
private static final class ErosionPreset {
|
||||
private final int erosionFaces;
|
||||
private final int erosionRecursion;
|
||||
|
@ -7,9 +7,6 @@ import org.bukkit.ChatColor;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockFace;
|
||||
|
||||
/**
|
||||
* @author psanker
|
||||
*/
|
||||
public class ExtrudeBrush extends Brush {
|
||||
private double trueCircle;
|
||||
|
||||
@ -148,7 +145,7 @@ public class ExtrudeBrush extends Brush {
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void parameters(final String[] par, final com.thevoxelbox.voxelsniper.SnipeData v) {
|
||||
public final void parameters(final String[] par, final SnipeData v) {
|
||||
for (int i = 1; i < par.length; i++) {
|
||||
final String parameter = par[i];
|
||||
|
||||
|
@ -8,9 +8,7 @@ import com.thevoxelbox.voxelsniper.brush.perform.PerformBrush;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.block.Block;
|
||||
|
||||
/**
|
||||
* @author Voxel
|
||||
*/
|
||||
|
||||
public class FillDownBrush extends PerformBrush {
|
||||
private double trueCircle = 0;
|
||||
private boolean fillLiquid = true;
|
||||
@ -42,7 +40,9 @@ public class FillDownBrush extends PerformBrush {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found) continue;
|
||||
if (!found) {
|
||||
continue;
|
||||
}
|
||||
y--;
|
||||
}
|
||||
for (; y >= -targetBlock.getY(); --y) {
|
||||
|
@ -6,9 +6,6 @@ import com.thevoxelbox.voxelsniper.SnipeData;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
|
||||
/**
|
||||
* @author GavJenks
|
||||
*/
|
||||
public class FlatOceanBrush extends Brush {
|
||||
private static final int DEFAULT_WATER_LEVEL = 29;
|
||||
private static final int DEFAULT_FLOOR_LEVEL = 8;
|
||||
@ -19,7 +16,6 @@ public class FlatOceanBrush extends Brush {
|
||||
this.setName("FlatOcean");
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private void flatOcean(final AsyncChunk chunk) {
|
||||
for (int x = 0; x < CHUNK_SIZE; x++) {
|
||||
for (int z = 0; z < CHUNK_SIZE; z++) {
|
||||
|
@ -14,9 +14,6 @@ import java.util.Random;
|
||||
|
||||
// Proposal: Use /v and /vr for leave and wood material // or two more parameters -- Monofraps
|
||||
|
||||
/**
|
||||
* @author Ghost8700 @ Voxel
|
||||
*/
|
||||
public class GenerateTreeBrush extends Brush {
|
||||
// Tree Variables.
|
||||
private Random randGenerator = new Random();
|
||||
@ -43,10 +40,7 @@ public class GenerateTreeBrush extends Brush {
|
||||
private int blockPositionY;
|
||||
private int blockPositionZ;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public GenerateTreeBrush() {
|
||||
public GenerateTreeBrush() {
|
||||
this.setName("Generate Tree");
|
||||
}
|
||||
|
||||
@ -79,7 +73,6 @@ public class GenerateTreeBrush extends Brush {
|
||||
}
|
||||
|
||||
// Branch Creation based on direction chosen from the parameters passed.
|
||||
@SuppressWarnings("deprecation")
|
||||
private void branchCreate(final int xDirection, final int zDirection) {
|
||||
|
||||
// Sets branch origin.
|
||||
@ -123,7 +116,6 @@ public class GenerateTreeBrush extends Brush {
|
||||
blockPositionZ = originZ;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private void leafNodeCreate() {
|
||||
// Generates the node size.
|
||||
final int nodeRadius = this.randGenerator.nextInt(this.nodeMax - this.nodeMin + 1) + this.nodeMin;
|
||||
@ -221,7 +213,6 @@ public class GenerateTreeBrush extends Brush {
|
||||
* @param xDirection
|
||||
* @param zDirection
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
private void rootCreate(final int xDirection, final int zDirection) {
|
||||
// Sets Origin.
|
||||
final int originX = blockPositionX;
|
||||
@ -311,7 +302,6 @@ public class GenerateTreeBrush extends Brush {
|
||||
this.rootCreate(-1, -1);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private void trunkCreate() {
|
||||
// Creates true circle discs of the set size using the wood type selected.
|
||||
final double bSquared = Math.pow(this.thickness + 0.5, 2);
|
||||
|
@ -13,25 +13,19 @@ import org.bukkit.util.noise.PerlinNoiseGenerator;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* @author Gavjenks
|
||||
*/
|
||||
public class HeatRayBrush extends Brush {
|
||||
|
||||
/**
|
||||
* @author MikeMatrix
|
||||
*/
|
||||
// private enum FlameableBlock
|
||||
// {
|
||||
// WOOD(Material.WOOD), SAPLING(Material.SAPLING), LOG(Material.LOG), LEAVES(Material.LEAVES), SPONGE(Material.SPONGE), WEB(Material.WEB), LONG_GRASS(Material.LONG_GRASS), DEAD_BUSH(Material.DEAD_BUSH), WOOL(Material.WOOL), YELLOW_FLOWER(Material.YELLOW_FLOWER), RED_ROSE(Material.RED_ROSE), TORCH(Material.TORCH), FIRE(Material.FIRE), WOOD_STAIRS(Material.WOOD_STAIRS), CROPS(Material.CROPS), SIGN_POST(Material.SIGN_POST), WOODEN_DOOR(Material.WOODEN_DOOR), LADDER(Material.LADDER), WALL_SIGN(Material.WALL_SIGN), WOOD_PLATE(Material.WOOD_PLATE), SNOW(Material.SNOW), ICE(Material.ICE), SUGAR_CANE_BLOCK(Material.SUGAR_CANE_BLOCK), FENCE(Material.FENCE), TRAP_DOOR(Material.TRAP_DOOR), VINE(Material.VINE), FENCE_GATE(Material.FENCE_GATE), WATER_LILLY(Material.WATER_LILY);
|
||||
//
|
||||
// private Material material;
|
||||
//
|
||||
// FlameableBlock(final Material material)
|
||||
// {
|
||||
// this.material = material;
|
||||
// }
|
||||
// }
|
||||
/* private enum FlameableBlock
|
||||
{
|
||||
WOOD(Material.WOOD), SAPLING(Material.SAPLING), LOG(Material.LOG), LEAVES(Material.LEAVES), SPONGE(Material.SPONGE), WEB(Material.WEB), LONG_GRASS(Material.LONG_GRASS), DEAD_BUSH(Material.DEAD_BUSH), WOOL(Material.WOOL), YELLOW_FLOWER(Material.YELLOW_FLOWER), RED_ROSE(Material.RED_ROSE), TORCH(Material.TORCH), FIRE(Material.FIRE), WOOD_STAIRS(Material.WOOD_STAIRS), CROPS(Material.CROPS), SIGN_POST(Material.SIGN_POST), WOODEN_DOOR(Material.WOODEN_DOOR), LADDER(Material.LADDER), WALL_SIGN(Material.WALL_SIGN), WOOD_PLATE(Material.WOOD_PLATE), SNOW(Material.SNOW), ICE(Material.ICE), SUGAR_CANE_BLOCK(Material.SUGAR_CANE_BLOCK), FENCE(Material.FENCE), TRAP_DOOR(Material.TRAP_DOOR), VINE(Material.VINE), FENCE_GATE(Material.FENCE_GATE), WATER_LILLY(Material.WATER_LILY);
|
||||
|
||||
private Material material;
|
||||
|
||||
FlameableBlock(final Material material)
|
||||
{
|
||||
this.material = material;
|
||||
}
|
||||
}*/
|
||||
|
||||
private static final double REQUIRED_OBSIDIAN_DENSITY = 0.6;
|
||||
private static final double REQUIRED_COBBLE_DENSITY = 0.5;
|
||||
|
@ -12,10 +12,6 @@ import org.bukkit.util.Vector;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* @author Giltwist
|
||||
* @author Monofraps
|
||||
*/
|
||||
public class JaggedLineBrush extends PerformBrush {
|
||||
private static final Vector HALF_BLOCK_OFFSET = new Vector(0.5, 0.5, 0.5);
|
||||
private static final int RECURSION_MIN = 1;
|
||||
|
@ -12,10 +12,6 @@ import org.bukkit.event.player.PlayerTeleportEvent;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Voxel
|
||||
* @author Monofraps
|
||||
*/
|
||||
public class JockeyBrush extends Brush {
|
||||
private static final int ENTITY_STACK_LIMIT = 50;
|
||||
private JockeyType jockeyType = JockeyType.NORMAL_ALL_ENTITIES;
|
||||
@ -138,11 +134,11 @@ public class JockeyBrush extends Brush {
|
||||
|
||||
@Override
|
||||
public final void parameters(final String[] par, final SnipeData v) {
|
||||
boolean inverse = false;
|
||||
boolean playerOnly = false;
|
||||
boolean stack = false;
|
||||
|
||||
try {
|
||||
boolean inverse = false;
|
||||
boolean playerOnly = false;
|
||||
boolean stack = false;
|
||||
for (String parameter : par) {
|
||||
if (parameter.startsWith("-i:")) {
|
||||
inverse = parameter.endsWith("y");
|
||||
|
@ -3,9 +3,6 @@ package com.thevoxelbox.voxelsniper.brush;
|
||||
import com.thevoxelbox.voxelsniper.Message;
|
||||
import com.thevoxelbox.voxelsniper.SnipeData;
|
||||
|
||||
/**
|
||||
* @author Gavjenks
|
||||
*/
|
||||
public class LightningBrush extends Brush {
|
||||
|
||||
public LightningBrush() {
|
||||
|
@ -10,11 +10,6 @@ import org.bukkit.util.BlockIterator;
|
||||
import org.bukkit.util.NumberConversions;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
/**
|
||||
* @author Gavjenks
|
||||
* @author giltwist
|
||||
* @author MikeMatrix
|
||||
*/
|
||||
public class LineBrush extends PerformBrush {
|
||||
private static final Vector HALF_BLOCK_OFFSET = new Vector(0.5, 0.5, 0.5);
|
||||
private Vector originCoords = null;
|
||||
|
@ -9,9 +9,7 @@ import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
|
||||
/**
|
||||
* @author Voxel
|
||||
*/
|
||||
|
||||
public class OceanBrush extends Brush {
|
||||
private static final int WATER_LEVEL_DEFAULT = 62; // y=63 -- we are using array indices here
|
||||
private static final int WATER_LEVEL_MIN = 12;
|
||||
|
@ -10,9 +10,6 @@ import com.thevoxelbox.voxelsniper.SnipeData;
|
||||
import com.thevoxelbox.voxelsniper.brush.perform.PerformBrush;
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
/**
|
||||
* @author Gavjenks
|
||||
*/
|
||||
public class OverlayBrush extends PerformBrush {
|
||||
private static final int DEFAULT_DEPTH = 3;
|
||||
private int depth = DEFAULT_DEPTH;
|
||||
@ -32,24 +29,24 @@ public class OverlayBrush extends PerformBrush {
|
||||
// check if column is valid
|
||||
// column is valid if it has no solid block right above the clicked layer
|
||||
final int materialId = this.getBlockIdAt(this.getTargetBlock().getX() + x,
|
||||
this.getTargetBlock().getY() + 1, this.getTargetBlock().getZ() + z);
|
||||
this.getTargetBlock().getY() + 1, this.getTargetBlock().getZ() + z);
|
||||
if (isIgnoredBlock(materialId)) {
|
||||
if ((Math.pow(x, 2) + Math.pow(z, 2)) <= brushSizeSquared) {
|
||||
for (int y = this.getTargetBlock().getY(); y > 0; y--) {
|
||||
// check for surface
|
||||
final int layerBlockId =
|
||||
this.getBlockIdAt(this.getTargetBlock().getX() + x, y,
|
||||
this.getTargetBlock().getZ() + z);
|
||||
this.getTargetBlock().getZ() + z);
|
||||
if (!isIgnoredBlock(layerBlockId)) {
|
||||
for (int currentDepth = y;
|
||||
y - currentDepth < depth; currentDepth--) {
|
||||
final int currentBlockId =
|
||||
this.getBlockIdAt(this.getTargetBlock().getX() + x,
|
||||
currentDepth, this.getTargetBlock().getZ() + z);
|
||||
currentDepth, this.getTargetBlock().getZ() + z);
|
||||
if (isOverrideableMaterial(currentBlockId)) {
|
||||
this.current.perform(
|
||||
this.clampY(this.getTargetBlock().getX() + x,
|
||||
currentDepth, this.getTargetBlock().getZ() + z));
|
||||
currentDepth, this.getTargetBlock().getZ() + z));
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -102,25 +99,25 @@ public class OverlayBrush extends PerformBrush {
|
||||
if ((Math.pow(x, 2) + Math.pow(z, 2))
|
||||
<= brushSizeSquared) { // if inside of the column...
|
||||
if (!this.getBlockAt(this.getTargetBlock().getX() + x, y - 1,
|
||||
this.getTargetBlock().getZ() + z)
|
||||
.isEmpty()) { // if not a floating block (like one of Notch'world pools)
|
||||
this.getTargetBlock().getZ() + z)
|
||||
.isEmpty()) { // if not a floating block (like one of Notch'world pools)
|
||||
if (this.getBlockAt(this.getTargetBlock().getX() + x, y + 1,
|
||||
this.getTargetBlock().getZ() + z)
|
||||
this.getTargetBlock().getZ() + z)
|
||||
.isEmpty()) { // must start at surface... this prevents it filling stuff in if
|
||||
// you click in a wall and it starts out below surface.
|
||||
if (!this.allBlocks) { // if the override parameter has not been activated, go to the switch that filters out manmade stuff.
|
||||
|
||||
BlockType type = BukkitAdapter.asBlockType((this
|
||||
.getBlockType(this.getTargetBlock().getX() + x, y,
|
||||
this.getTargetBlock().getZ() + z)));
|
||||
this.getTargetBlock().getZ() + z)));
|
||||
BlockMaterial mat = type.getMaterial();
|
||||
if (mat.isSolid() && mat.isFullCube() && !mat
|
||||
.hasContainer()) {
|
||||
for (int d = 1; (d < this.depth + 1); d++) {
|
||||
this.current.perform(
|
||||
this.clampY(this.getTargetBlock().getX() + x,
|
||||
y + d, this.getTargetBlock().getZ()
|
||||
+ z)); // fills down as many layers as you specify
|
||||
y + d, this.getTargetBlock().getZ()
|
||||
+ z)); // fills down as many layers as you specify
|
||||
// in parameters
|
||||
memory[x + brushSize][z + brushSize] =
|
||||
1; // stop it from checking any other blocks in this vertical 1x1 column.
|
||||
@ -132,8 +129,8 @@ public class OverlayBrush extends PerformBrush {
|
||||
for (int d = 1; (d < this.depth + 1); d++) {
|
||||
this.current.perform(
|
||||
this.clampY(this.getTargetBlock().getX() + x, y + d,
|
||||
this.getTargetBlock().getZ()
|
||||
+ z)); // fills down as many layers as you specify in
|
||||
this.getTargetBlock().getZ()
|
||||
+ z)); // fills down as many layers as you specify in
|
||||
// parameters
|
||||
memory[x + brushSize][z + brushSize] =
|
||||
1; // stop it from checking any other blocks in this vertical 1x1 column.
|
||||
@ -176,9 +173,9 @@ public class OverlayBrush extends PerformBrush {
|
||||
if (parameter.equalsIgnoreCase("info")) {
|
||||
v.sendMessage(ChatColor.GOLD + "Overlay brush parameters:");
|
||||
v.sendMessage(ChatColor.AQUA
|
||||
+ "d[number] (ex: d3) How many blocks deep you want to replace from the surface.");
|
||||
+ "d[number] (ex: d3) How many blocks deep you want to replace from the surface.");
|
||||
v.sendMessage(ChatColor.BLUE
|
||||
+ "all (ex: /b over all) Sets the brush to overlay over ALL materials, not just natural surface ones (will no longer ignore trees and buildings). The parameter /some will set it back to default.");
|
||||
+ "all (ex: /b over all) Sets the brush to overlay over ALL materials, not just natural surface ones (will no longer ignore trees and buildings). The parameter /some will set it back to default.");
|
||||
return;
|
||||
}
|
||||
if (parameter.startsWith("d")) {
|
||||
@ -202,7 +199,7 @@ public class OverlayBrush extends PerformBrush {
|
||||
ChatColor.BLUE + "Will overlay only natural block types." + this.depth);
|
||||
} else {
|
||||
v.sendMessage(ChatColor.RED
|
||||
+ "Invalid brush parameters! Use the info parameter to display parameter info.");
|
||||
+ "Invalid brush parameters! Use the info parameter to display parameter info.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ import com.thevoxelbox.voxelsniper.SnipeData;
|
||||
|
||||
/**
|
||||
* Painting scrolling Brush.
|
||||
*
|
||||
* @author Voxel
|
||||
*/
|
||||
public class PaintingBrush extends Brush {
|
||||
|
@ -8,9 +8,7 @@ import org.bukkit.ChatColor;
|
||||
|
||||
import java.util.HashSet;
|
||||
|
||||
/**
|
||||
* @author Piotr
|
||||
*/
|
||||
|
||||
public class PullBrush extends Brush {
|
||||
private final HashSet<BlockWrapper> surface = new HashSet<>();
|
||||
private int vh;
|
||||
@ -244,9 +242,7 @@ public class PullBrush extends Brush {
|
||||
return "voxelsniper.brush.pull";
|
||||
}
|
||||
|
||||
/**
|
||||
* @author Piotr
|
||||
*/
|
||||
|
||||
private final class BlockWrapper {
|
||||
|
||||
private final int id;
|
||||
|
@ -19,11 +19,6 @@ import org.bukkit.util.Vector;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* @author Monofraps
|
||||
* @author Deamon
|
||||
* @author MikeMatrix
|
||||
*/
|
||||
public class PunishBrush extends PerformBrush {
|
||||
private static final int MAXIMAL_RANDOM_TELEPORTATION_RANGE = 400;
|
||||
private static final int TICKS_PER_SECOND = 20;
|
||||
@ -313,9 +308,6 @@ public class PunishBrush extends PerformBrush {
|
||||
return "voxelsniper.brush.punish";
|
||||
}
|
||||
|
||||
/**
|
||||
* @author Monofraps
|
||||
*/
|
||||
private enum Punishment {
|
||||
// Monofraps
|
||||
FIRE, LIGHTNING, BLINDNESS, DRUNK, KILL, RANDOMTP, ALL_POTION,
|
||||
|
@ -8,10 +8,6 @@ import com.thevoxelbox.voxelsniper.Undo;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* @author Piotr
|
||||
* @author Giltwist (Randomized blockPositionY)
|
||||
*/
|
||||
public class RandomErodeBrush extends Brush {
|
||||
private final double trueCircle = 0.5;
|
||||
private BlockWrapper[][][] snap;
|
||||
@ -19,7 +15,6 @@ public class RandomErodeBrush extends Brush {
|
||||
private int bsize;
|
||||
private int erodeFace;
|
||||
private int fillFace;
|
||||
private int brushSize;
|
||||
private int erodeRecursion = 1;
|
||||
private int fillRecursion = 1;
|
||||
private Random generator = new Random();
|
||||
@ -55,7 +50,6 @@ public class RandomErodeBrush extends Brush {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private boolean fill(final int x, final int y, final int z) {
|
||||
if (this.snap[x][y][z].isSolid()) {
|
||||
return false;
|
||||
@ -90,19 +84,17 @@ public class RandomErodeBrush extends Brush {
|
||||
}
|
||||
|
||||
private void getMatrix() {
|
||||
this.brushSize = ((this.bsize + 1) * 2) + 1;
|
||||
int brushSize = ((this.bsize + 1) * 2) + 1;
|
||||
|
||||
if (this.snap.length == 0) {
|
||||
this.snap = new BlockWrapper[this.brushSize][this.brushSize][this.brushSize];
|
||||
this.snap = new BlockWrapper[brushSize][brushSize][brushSize];
|
||||
|
||||
int sx = this.getTargetBlock().getX() - (this.bsize + 1);
|
||||
int sy = this.getTargetBlock().getY() - (this.bsize + 1);
|
||||
int sz = this.getTargetBlock().getZ() - (this.bsize + 1);
|
||||
|
||||
for (int x = 0; x < this.snap.length; x++) {
|
||||
sz = this.getTargetBlock().getZ() - (this.bsize + 1);
|
||||
int sz = this.getTargetBlock().getZ() - (this.bsize + 1);
|
||||
for (int z = 0; z < this.snap.length; z++) {
|
||||
sy = this.getTargetBlock().getY() - (this.bsize + 1);
|
||||
int sy = this.getTargetBlock().getY() - (this.bsize + 1);
|
||||
for (int y = 0; y < this.snap.length; y++) {
|
||||
this.snap[x][y][z] = new BlockWrapper(this.clampY(sx, sy, sz));
|
||||
sy++;
|
||||
@ -113,16 +105,14 @@ public class RandomErodeBrush extends Brush {
|
||||
}
|
||||
this.firstSnap = this.snap.clone();
|
||||
} else {
|
||||
this.snap = new BlockWrapper[this.brushSize][this.brushSize][this.brushSize];
|
||||
this.snap = new BlockWrapper[brushSize][brushSize][brushSize];
|
||||
|
||||
int sx = this.getTargetBlock().getX() - (this.bsize + 1);
|
||||
int sy = this.getTargetBlock().getY() - (this.bsize + 1);
|
||||
int sz = this.getTargetBlock().getZ() - (this.bsize + 1);
|
||||
|
||||
for (int x = 0; x < this.snap.length; x++) {
|
||||
sz = this.getTargetBlock().getZ() - (this.bsize + 1);
|
||||
int sz = this.getTargetBlock().getZ() - (this.bsize + 1);
|
||||
for (int z = 0; z < this.snap.length; z++) {
|
||||
sy = this.getTargetBlock().getY() - (this.bsize + 1);
|
||||
int sy = this.getTargetBlock().getY() - (this.bsize + 1);
|
||||
for (int y = 0; y < this.snap.length; y++) {
|
||||
this.snap[x][y][z] = new BlockWrapper(this.clampY(sx, sy, sz));
|
||||
sy++;
|
||||
@ -312,29 +302,18 @@ public class RandomErodeBrush extends Brush {
|
||||
return "voxelsniper.brush.randomerode";
|
||||
}
|
||||
|
||||
/**
|
||||
* @author unknown
|
||||
*/
|
||||
private class BlockWrapper {
|
||||
private boolean solid;
|
||||
private AsyncBlock nativeBlock;
|
||||
private int id;
|
||||
private int i;
|
||||
|
||||
/**
|
||||
* @param bl
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public BlockWrapper(final AsyncBlock bl) {
|
||||
this.setNativeBlock(bl);
|
||||
this.setI(bl.getTypeId());
|
||||
switch (bl.getType()) {
|
||||
case AIR:
|
||||
this.setSolid(false);
|
||||
break;
|
||||
case WATER:
|
||||
this.setSolid(false);
|
||||
break;
|
||||
case LAVA:
|
||||
this.setSolid(false);
|
||||
break;
|
||||
|
@ -6,9 +6,7 @@ import com.thevoxelbox.voxelsniper.SnipeData;
|
||||
import com.thevoxelbox.voxelsniper.brush.perform.PerformBrush;
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
/**
|
||||
* @author Voxel
|
||||
*/
|
||||
|
||||
public class RingBrush extends PerformBrush {
|
||||
private double trueCircle = 0;
|
||||
private double innerSize = 0;
|
||||
|
@ -7,9 +7,7 @@ import com.thevoxelbox.voxelsniper.SnipeData;
|
||||
import com.thevoxelbox.voxelsniper.util.BlockWrapper;
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
/**
|
||||
* @author Piotr
|
||||
*/
|
||||
|
||||
public class Rot2DBrush extends Brush {
|
||||
private int mode = 0;
|
||||
private int bSize;
|
||||
|
@ -8,15 +8,11 @@ import com.thevoxelbox.voxelsniper.util.BlockWrapper;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
/**
|
||||
* @author Gavjenks, hack job from the other 2d rotation brush blockPositionY piotr
|
||||
*/
|
||||
// The X Y and Z variable names in this file do NOT MAKE ANY SENSE. Do not attempt to actually figure out what on earth is going on here. Just go to the
|
||||
// original 2d horizontal brush if you wish to make anything similar to this, and start there. I didn't bother renaming everything.
|
||||
public class Rot2DvertBrush extends Brush {
|
||||
private int mode = 0;
|
||||
private int bSize;
|
||||
private int brushSize;
|
||||
private BlockWrapper[][][] snap;
|
||||
private double se;
|
||||
|
||||
@ -26,19 +22,17 @@ public class Rot2DvertBrush extends Brush {
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private void getMatrix() {
|
||||
this.brushSize = (this.bSize * 2) + 1;
|
||||
int brushSize = (this.bSize * 2) + 1;
|
||||
|
||||
this.snap = new BlockWrapper[this.brushSize][this.brushSize][this.brushSize];
|
||||
this.snap = new BlockWrapper[brushSize][brushSize][brushSize];
|
||||
|
||||
int sx = this.getTargetBlock().getX() - this.bSize;
|
||||
int sy = this.getTargetBlock().getY() - this.bSize;
|
||||
int sz = this.getTargetBlock().getZ() - this.bSize;
|
||||
|
||||
for (int x = 0; x < this.snap.length; x++) {
|
||||
sz = this.getTargetBlock().getZ() - this.bSize;
|
||||
int sz = this.getTargetBlock().getZ() - this.bSize;
|
||||
|
||||
for (int z = 0; z < this.snap.length; z++) {
|
||||
sy = this.getTargetBlock().getY() - this.bSize;
|
||||
int sy = this.getTargetBlock().getY() - this.bSize;
|
||||
|
||||
for (int y = 0; y < this.snap.length; y++) {
|
||||
final AsyncBlock block = this.clampY(sx, sy, sz); // why is this not sx + x, sy + y sz + z?
|
||||
@ -53,7 +47,7 @@ public class Rot2DvertBrush extends Brush {
|
||||
}
|
||||
}
|
||||
|
||||
private void rotate(final SnipeData v) {
|
||||
private void rotate() {
|
||||
final double brushSizeSquared = Math.pow(this.bSize + 0.5, 2);
|
||||
final double cos = Math.cos(this.se);
|
||||
final double sin = Math.sin(this.se);
|
||||
@ -139,7 +133,7 @@ public class Rot2DvertBrush extends Brush {
|
||||
|
||||
if (this.mode == 0) {
|
||||
this.getMatrix();
|
||||
this.rotate(v);
|
||||
this.rotate();
|
||||
} else {
|
||||
v.owner().getPlayer().sendMessage(ChatColor.RED + "Something went wrong.");
|
||||
}
|
||||
@ -151,7 +145,7 @@ public class Rot2DvertBrush extends Brush {
|
||||
|
||||
if (this.mode == 0) {
|
||||
this.getMatrix();
|
||||
this.rotate(v);
|
||||
this.rotate();
|
||||
} else {
|
||||
v.owner().getPlayer().sendMessage(ChatColor.RED + "Something went wrong.");
|
||||
}
|
||||
|
@ -6,9 +6,6 @@ import com.thevoxelbox.voxelsniper.Undo;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
/**
|
||||
* @author Gavjenks
|
||||
*/
|
||||
public class RulerBrush extends Brush {
|
||||
private boolean first = true;
|
||||
private Vector coords = new Vector(0, 0, 0);
|
||||
|
@ -8,9 +8,6 @@ import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.BlockFace;
|
||||
|
||||
/**
|
||||
* @author DivineRage
|
||||
*/
|
||||
public class ScannerBrush extends Brush {
|
||||
private static final int DEPTH_MIN = 1;
|
||||
private static final int DEPTH_DEFAULT = 24;
|
||||
|
@ -6,9 +6,7 @@ import com.thevoxelbox.voxelsniper.brush.perform.PerformBrush;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.block.Block;
|
||||
|
||||
/**
|
||||
* @author Voxel
|
||||
*/
|
||||
|
||||
public class SetBrush extends PerformBrush {
|
||||
private static final int SELECTION_SIZE_MAX = 5000000;
|
||||
private Block block = null;
|
||||
|
@ -8,9 +8,7 @@ import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
|
||||
/**
|
||||
* @author Voxel
|
||||
*/
|
||||
|
||||
public class SetRedstoneFlipBrush extends Brush {
|
||||
private Block block = null;
|
||||
private Undo undo;
|
||||
|
@ -8,9 +8,7 @@ import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
|
||||
/**
|
||||
* @author Voxel
|
||||
*/
|
||||
|
||||
public class SetRedstoneRotateBrush extends Brush {
|
||||
private Block block = null;
|
||||
private Undo undo;
|
||||
|
@ -8,6 +8,7 @@ import org.bukkit.block.Block;
|
||||
|
||||
/**
|
||||
* THIS BRUSH SHOULD NOT USE PERFORMERS.
|
||||
*
|
||||
* @author Voxel
|
||||
*/
|
||||
public class ShellBallBrush extends Brush {
|
||||
@ -39,7 +40,7 @@ public class ShellBallBrush extends Brush {
|
||||
for (int x = 0; x <= brushSizeDoubled; x++) {
|
||||
for (int y = 0; y <= brushSizeDoubled; y++) {
|
||||
System.arraycopy(oldMaterials[x + 1][y + 1], 1, newMaterials[x][y], 0,
|
||||
brushSizeDoubled + 1);
|
||||
brushSizeDoubled + 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9,9 +9,7 @@ import org.bukkit.block.Block;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* @author Piotr
|
||||
*/
|
||||
|
||||
public class ShellSetBrush extends Brush {
|
||||
private static final int MAX_SIZE = 5000000;
|
||||
private Block block = null;
|
||||
|
@ -8,6 +8,7 @@ import org.bukkit.block.Block;
|
||||
|
||||
/**
|
||||
* THIS BRUSH SHOULD NOT USE PERFORMERS.
|
||||
*
|
||||
* @author Voxel
|
||||
*/
|
||||
public class ShellVoxelBrush extends Brush {
|
||||
@ -38,7 +39,7 @@ public class ShellVoxelBrush extends Brush {
|
||||
for (int x = 0; x <= brushSizeSquared; x++) {
|
||||
for (int y = 0; y <= brushSizeSquared; y++) {
|
||||
System.arraycopy(oldMaterials[x + 1][y + 1], 1, newMaterials[x][y], 0,
|
||||
brushSizeSquared + 1);
|
||||
brushSizeSquared + 1);
|
||||
}
|
||||
}
|
||||
int temp;
|
||||
|
@ -12,6 +12,7 @@ import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* Overwrites signs.
|
||||
*
|
||||
* @author Monofraps
|
||||
*/
|
||||
public class SignOverwriteBrush extends Brush {
|
||||
@ -324,10 +325,10 @@ public class SignOverwriteBrush extends Brush {
|
||||
|
||||
try (FileReader inFile = new FileReader(store); BufferedReader inStream = new BufferedReader(inFile)) {
|
||||
|
||||
for (int i = 0; i < this.signTextLines.length; i++) {
|
||||
this.signLinesEnabled[i] = Boolean.parseBoolean(inStream.readLine());
|
||||
this.signTextLines[i] = inStream.readLine();
|
||||
}
|
||||
for (int i = 0; i < this.signTextLines.length; i++) {
|
||||
this.signLinesEnabled[i] = Boolean.parseBoolean(inStream.readLine());
|
||||
this.signTextLines[i] = inStream.readLine();
|
||||
}
|
||||
|
||||
v.sendMessage(ChatColor.BLUE + "File loaded successfully.");
|
||||
} catch (IOException exception) {
|
||||
|
@ -4,9 +4,7 @@ import com.thevoxelbox.voxelsniper.Message;
|
||||
import com.thevoxelbox.voxelsniper.SnipeData;
|
||||
import com.thevoxelbox.voxelsniper.brush.perform.PerformBrush;
|
||||
|
||||
/**
|
||||
* @author Voxel
|
||||
*/
|
||||
|
||||
public class SnipeBrush extends PerformBrush {
|
||||
|
||||
public SnipeBrush() {
|
||||
|
@ -12,9 +12,7 @@ import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockFace;
|
||||
|
||||
/**
|
||||
* @author Voxel
|
||||
*/
|
||||
|
||||
public class SnowConeBrush extends Brush {
|
||||
@SuppressWarnings("deprecation")
|
||||
private void addSnow(final SnipeData v, Block targetBlock) {
|
||||
@ -127,11 +125,11 @@ public class SnowConeBrush extends Brush {
|
||||
} else {
|
||||
Block blockAbove = getTargetBlock().getRelative(BlockFace.UP);
|
||||
if (blockAbove != null && BukkitAdapter.adapt(blockAbove.getType()).getMaterial()
|
||||
.isAir()) {
|
||||
.isAir()) {
|
||||
addSnow(v, blockAbove);
|
||||
} else {
|
||||
v.owner().getPlayer()
|
||||
.sendMessage(ChatColor.RED + "Error: Center block neither snow nor air.");
|
||||
.sendMessage(ChatColor.RED + "Error: Center block neither snow nor air.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
package com.thevoxelbox.voxelsniper.brush;
|
||||
|
||||
import com.sk89q.worldedit.extension.input.InputParseException;
|
||||
import com.sk89q.worldedit.world.block.BlockType;
|
||||
import com.sk89q.worldedit.world.block.BlockTypes;
|
||||
import com.thevoxelbox.voxelsniper.Message;
|
||||
import com.thevoxelbox.voxelsniper.SnipeData;
|
||||
@ -9,9 +8,6 @@ import com.thevoxelbox.voxelsniper.Undo;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.block.Block;
|
||||
|
||||
/**
|
||||
* @author giltwist
|
||||
*/
|
||||
public class SpiralStaircaseBrush extends Brush {
|
||||
private String stairtype = "block"; // "block" 1x1 blocks (default), "step" alternating step double step, "stair" staircase with blocks on corners
|
||||
private String sdirect = "c"; // "c" clockwise (default), "cc" counter-clockwise
|
||||
@ -21,7 +17,6 @@ public class SpiralStaircaseBrush extends Brush {
|
||||
this.setName("Spiral Staircase");
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private void buildStairWell(final SnipeData v, Block targetBlock) {
|
||||
if (v.getVoxelHeight() < 1) {
|
||||
v.setVoxelHeight(1);
|
||||
@ -32,12 +27,9 @@ public class SpiralStaircaseBrush extends Brush {
|
||||
|
||||
// locate first block in staircase
|
||||
// Note to self, fix these
|
||||
int startX = 0;
|
||||
int startZ = 0;
|
||||
int startX;
|
||||
int startZ;
|
||||
int y = 0;
|
||||
int xOffset = 0;
|
||||
int zOffset = 0;
|
||||
int toggle = 0;
|
||||
|
||||
if (this.sdirect.equalsIgnoreCase("cc")) {
|
||||
if (this.sopen.equalsIgnoreCase("n")) {
|
||||
@ -69,6 +61,9 @@ public class SpiralStaircaseBrush extends Brush {
|
||||
}
|
||||
}
|
||||
|
||||
int xOffset = 0;
|
||||
int zOffset = 0;
|
||||
int toggle = 0;
|
||||
while (y < v.getVoxelHeight()) {
|
||||
if (this.stairtype.equalsIgnoreCase("block")) {
|
||||
// 1x1x1 voxel material steps
|
||||
@ -218,9 +213,6 @@ public class SpiralStaircaseBrush extends Brush {
|
||||
|
||||
break;
|
||||
case 1:
|
||||
switch (stairtype) {
|
||||
|
||||
}
|
||||
if (this.stairtype.equalsIgnoreCase("block")) {
|
||||
this.setBlockIdAt(blockPositionZ - v.getBrushSize() + z, blockPositionX - v.getBrushSize() + x, blockPositionY + i, v.getVoxelId());
|
||||
} else if (this.stairtype.equalsIgnoreCase("step")) {
|
||||
@ -253,7 +245,6 @@ public class SpiralStaircaseBrush extends Brush {
|
||||
v.owner().storeUndo(undo);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private void digStairWell(final SnipeData v, Block targetBlock) {
|
||||
if (v.getVoxelHeight() < 1) {
|
||||
v.setVoxelHeight(1);
|
||||
@ -265,12 +256,8 @@ public class SpiralStaircaseBrush extends Brush {
|
||||
|
||||
// locate first block in staircase
|
||||
// Note to self, fix these
|
||||
int startX = 0;
|
||||
int startZ = 0;
|
||||
int y = 0;
|
||||
int xOffset = 0;
|
||||
int zOffset = 0;
|
||||
int toggle = 0;
|
||||
int startX;
|
||||
int startZ;
|
||||
|
||||
if (this.sdirect.equalsIgnoreCase("cc")) {
|
||||
if (this.sopen.equalsIgnoreCase("n")) {
|
||||
@ -302,6 +289,10 @@ public class SpiralStaircaseBrush extends Brush {
|
||||
}
|
||||
}
|
||||
|
||||
int xOffset = 0;
|
||||
int zOffset = 0;
|
||||
int toggle = 0;
|
||||
int y = 0;
|
||||
while (y < v.getVoxelHeight()) {
|
||||
if (this.stairtype.equalsIgnoreCase("block")) {
|
||||
// 1x1x1 voxel material steps
|
||||
@ -517,14 +508,11 @@ public class SpiralStaircaseBrush extends Brush {
|
||||
// step/slab
|
||||
|
||||
try {
|
||||
BlockType type = BlockTypes.parse(par[i]);
|
||||
this.stairtype = par[i].toLowerCase().intern();
|
||||
v.sendMessage(ChatColor.BLUE + "Staircase type: " + this.stairtype);
|
||||
return;
|
||||
} catch (InputParseException ignore) {
|
||||
}
|
||||
if ("block".equals(par[i].toLowerCase())) {
|
||||
}
|
||||
if (par[i].equalsIgnoreCase("block") || par[i].equalsIgnoreCase("step") || par[i].equalsIgnoreCase("woodstair") || par[i].equalsIgnoreCase("cobblestair")) {
|
||||
this.stairtype = par[i].toLowerCase().intern();
|
||||
v.sendMessage(ChatColor.BLUE + "Staircase type: " + this.stairtype);
|
||||
|
@ -8,9 +8,7 @@ import org.bukkit.ChatColor;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* @author Voxel
|
||||
*/
|
||||
|
||||
public class SplatterBallBrush extends PerformBrush {
|
||||
private static final int GROW_PERCENT_MIN = 1;
|
||||
private static final int GROW_PERCENT_DEFAULT = 1000;
|
||||
@ -100,9 +98,10 @@ public class SplatterBallBrush extends PerformBrush {
|
||||
// integrate tempsplat back into splat at end of iteration
|
||||
for (int x = 2 * v.getBrushSize(); x >= 0; x--) {
|
||||
for (int y = 2 * v.getBrushSize(); y >= 0; y--) {
|
||||
if (2 * v.getBrushSize() + 1 >= 0)
|
||||
if (2 * v.getBrushSize() + 1 >= 0) {
|
||||
System.arraycopy(tempSplat[x][y], 0, splat[x][y], 0,
|
||||
2 * v.getBrushSize() + 1);
|
||||
2 * v.getBrushSize() + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8,9 +8,7 @@ import org.bukkit.ChatColor;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* @author Voxel
|
||||
*/
|
||||
|
||||
public class SplatterDiscBrush extends PerformBrush {
|
||||
private static final int GROW_PERCENT_MIN = 1;
|
||||
private static final int GROW_PERCENT_DEFAULT = 1000;
|
||||
@ -90,8 +88,9 @@ public class SplatterDiscBrush extends PerformBrush {
|
||||
|
||||
// integrate tempsplat back into splat at end of iteration
|
||||
for (int x = 2 * v.getBrushSize(); x >= 0; x--) {
|
||||
if (2 * v.getBrushSize() + 1 >= 0)
|
||||
if (2 * v.getBrushSize() + 1 >= 0) {
|
||||
System.arraycopy(tempSplat[x], 0, splat[x], 0, 2 * v.getBrushSize() + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
this.growPercent = gref;
|
||||
|
@ -10,9 +10,6 @@ import org.bukkit.ChatColor;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* @author Gavjenks Splatterized blockPositionY Giltwist
|
||||
*/
|
||||
public class SplatterOverlayBrush extends PerformBrush {
|
||||
private static final int GROW_PERCENT_MIN = 1;
|
||||
private static final int GROW_PERCENT_DEFAULT = 1000;
|
||||
@ -83,8 +80,9 @@ public class SplatterOverlayBrush extends PerformBrush {
|
||||
}
|
||||
// integrate tempsplat back into splat at end of iteration
|
||||
for (int x = 2 * v.getBrushSize(); x >= 0; x--) {
|
||||
if (2 * v.getBrushSize() + 1 >= 0)
|
||||
if (2 * v.getBrushSize() + 1 >= 0) {
|
||||
System.arraycopy(tempSplat[x], 0, splat[x], 0, 2 * v.getBrushSize() + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
this.growPercent = gref;
|
||||
@ -119,9 +117,6 @@ public class SplatterOverlayBrush extends PerformBrush {
|
||||
memory[x + v.getBrushSize()][z + v.getBrushSize()] = 1;
|
||||
}
|
||||
}
|
||||
continue;
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
final int depth = randomizeHeight ? generator.nextInt(this.depth) : this.depth;
|
||||
@ -192,8 +187,9 @@ public class SplatterOverlayBrush extends PerformBrush {
|
||||
}
|
||||
// integrate tempsplat back into splat at end of iteration
|
||||
for (int x = 2 * v.getBrushSize(); x >= 0; x--) {
|
||||
if (2 * v.getBrushSize() + 1 >= 0)
|
||||
if (2 * v.getBrushSize() + 1 >= 0) {
|
||||
System.arraycopy(tempsplat[x], 0, splat[x], 0, 2 * v.getBrushSize() + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
this.growPercent = gref;
|
||||
@ -220,9 +216,6 @@ public class SplatterOverlayBrush extends PerformBrush {
|
||||
// in parameters
|
||||
memory[x + v.getBrushSize()][z + v.getBrushSize()] = 1; // stop it from checking any other blocks in this vertical 1x1 column.
|
||||
}
|
||||
continue;
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
final int depth = randomizeHeight ? generator.nextInt(this.depth) : this.depth;
|
||||
|
@ -8,9 +8,7 @@ import org.bukkit.ChatColor;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* @author Voxel
|
||||
*/
|
||||
|
||||
public class SplatterVoxelBrush extends PerformBrush {
|
||||
private static final int GROW_PERCENT_MIN = 1;
|
||||
private static final int GROW_PERCENT_DEFAULT = 1000;
|
||||
@ -100,9 +98,10 @@ public class SplatterVoxelBrush extends PerformBrush {
|
||||
// integrate tempsplat back into splat at end of iteration
|
||||
for (int x = 2 * v.getBrushSize(); x >= 0; x--) {
|
||||
for (int y = 2 * v.getBrushSize(); y >= 0; y--) {
|
||||
if (2 * v.getBrushSize() + 1 >= 0)
|
||||
if (2 * v.getBrushSize() + 1 >= 0) {
|
||||
System.arraycopy(tempSplat[x][y], 0, splat[x][y], 0,
|
||||
2 * v.getBrushSize() + 1);
|
||||
2 * v.getBrushSize() + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8,9 +8,7 @@ import org.bukkit.block.Block;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* @author Voxel
|
||||
*/
|
||||
|
||||
public class SplatterVoxelDiscBrush extends PerformBrush {
|
||||
private static final int GROW_PERCENT_MIN = 1;
|
||||
private static final int GROW_PERCENT_DEFAULT = 1000;
|
||||
@ -87,8 +85,9 @@ public class SplatterVoxelDiscBrush extends PerformBrush {
|
||||
}
|
||||
// integrate tempsplat back into splat at end of iteration
|
||||
for (int x = 2 * v.getBrushSize(); x >= 0; x--) {
|
||||
if (2 * v.getBrushSize() + 1 >= 0)
|
||||
if (2 * v.getBrushSize() + 1 >= 0) {
|
||||
System.arraycopy(tempSplat[x], 0, splat[x], 0, 2 * v.getBrushSize() + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
this.growPercent = gref;
|
||||
|
@ -43,7 +43,7 @@ public class SplineBrush extends PerformBrush {
|
||||
|
||||
this.ctrlPts.add(targetBlock);
|
||||
v.sendMessage(ChatColor.GRAY + "Added block " + ChatColor.RED + "(" + targetBlock.getX() + ", " + targetBlock.getY() + ", " + targetBlock.getZ() + ") " + ChatColor.GRAY
|
||||
+ "to control point selection");
|
||||
+ "to control point selection");
|
||||
}
|
||||
|
||||
public final void removeFromSet(final SnipeData v, final boolean ep, Block targetBlock) {
|
||||
@ -55,7 +55,7 @@ public class SplineBrush extends PerformBrush {
|
||||
|
||||
this.endPts.add(targetBlock);
|
||||
v.sendMessage(ChatColor.GRAY + "Removed block " + ChatColor.RED + "(" + targetBlock.getX() + ", " + targetBlock.getY() + ", " + targetBlock.getZ() + ") " + ChatColor.GRAY
|
||||
+ "from endpoint selection");
|
||||
+ "from endpoint selection");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -66,7 +66,7 @@ public class SplineBrush extends PerformBrush {
|
||||
|
||||
this.ctrlPts.remove(targetBlock);
|
||||
v.sendMessage(ChatColor.GRAY + "Removed block " + ChatColor.RED + "(" + targetBlock.getX() + ", " + targetBlock.getY() + ", " + targetBlock.getZ() + ") " + ChatColor.GRAY
|
||||
+ "from control point selection");
|
||||
+ "from control point selection");
|
||||
}
|
||||
|
||||
public final boolean spline(final Point start, final Point end, final Point c1, final Point c2, final SnipeData v) {
|
||||
@ -146,7 +146,7 @@ public class SplineBrush extends PerformBrush {
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void parameters(final String[] par, final com.thevoxelbox.voxelsniper.SnipeData v) {
|
||||
public final void parameters(final String[] par, final SnipeData v) {
|
||||
for (int i = 1; i < par.length; i++) {
|
||||
if (par[i].equalsIgnoreCase("info")) {
|
||||
v.sendMessage(ChatColor.GOLD + "Spline brush parameters");
|
||||
|
@ -27,25 +27,14 @@ public class StampBrush extends Brush {
|
||||
this.sorted = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
protected final boolean falling(final int id) {
|
||||
return (id > 7 && id < 14);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
protected final boolean fallsOff(final int id) {
|
||||
return (BlockTypes.get(id).getMaterial().isFragileWhenPushed());
|
||||
}
|
||||
|
||||
/**
|
||||
* @param cb
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
protected final void setBlock(final BlockWrapper cb) {
|
||||
final AsyncBlock block = this.clampY(this.getTargetBlock().getX() + cb.x, this.getTargetBlock().getY() + cb.y, this.getTargetBlock().getZ() + cb.z);
|
||||
@ -54,9 +43,6 @@ public class StampBrush extends Brush {
|
||||
block.setPropertyId(cb.d);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param cb
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
protected final void setBlockFill(final BlockWrapper cb) {
|
||||
final AsyncBlock block = this.clampY(this.getTargetBlock().getX() + cb.x, this.getTargetBlock().getY() + cb.y, this.getTargetBlock().getZ() + cb.z);
|
||||
@ -67,16 +53,10 @@ public class StampBrush extends Brush {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param type
|
||||
*/
|
||||
protected final void setStamp(final StampType type) {
|
||||
this.stamp = type;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param v
|
||||
*/
|
||||
protected final void stamp(final SnipeData v) {
|
||||
this.undo = new Undo();
|
||||
|
||||
@ -116,9 +96,6 @@ public class StampBrush extends Brush {
|
||||
v.owner().storeUndo(this.undo);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param v
|
||||
*/
|
||||
protected final void stampFill(final SnipeData v) {
|
||||
|
||||
this.undo = new Undo();
|
||||
@ -159,9 +136,6 @@ public class StampBrush extends Brush {
|
||||
v.owner().storeUndo(this.undo);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param v
|
||||
*/
|
||||
protected final void stampNoAir(final SnipeData v) {
|
||||
|
||||
this.undo = new Undo();
|
||||
@ -238,16 +212,11 @@ public class StampBrush extends Brush {
|
||||
return "voxelsniper.brush.stamp";
|
||||
}
|
||||
|
||||
/**
|
||||
* @author Monofraps
|
||||
*/
|
||||
protected enum StampType {
|
||||
NO_AIR, FILL, DEFAULT
|
||||
}
|
||||
|
||||
/**
|
||||
* @author Voxel
|
||||
*/
|
||||
|
||||
protected class BlockWrapper {
|
||||
public int id;
|
||||
public int x;
|
||||
@ -255,13 +224,6 @@ public class StampBrush extends Brush {
|
||||
public int z;
|
||||
public int d;
|
||||
|
||||
/**
|
||||
* @param b
|
||||
* @param blx
|
||||
* @param bly
|
||||
* @param blz
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public BlockWrapper(final AsyncBlock b, final int blx, final int bly, final int blz) {
|
||||
this.id = b.getTypeId();
|
||||
this.d = b.getPropertyId();
|
||||
|
@ -42,10 +42,7 @@ public class StencilBrush extends Brush {
|
||||
private int[] pastePoint = new int[3];
|
||||
private byte point = 1;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public StencilBrush() {
|
||||
public StencilBrush() {
|
||||
this.setName("Stencil");
|
||||
}
|
||||
|
||||
@ -60,8 +57,7 @@ public class StencilBrush extends Brush {
|
||||
final File file = new File("plugins/VoxelSniper/stencils/" + this.filename + ".vstencil");
|
||||
|
||||
if (file.exists()) {
|
||||
try {
|
||||
final FaweInputStream in = new FaweInputStream(new DataInputStream(new GZIPInputStream(new BufferedInputStream(new FileInputStream(file)))));
|
||||
try (final FaweInputStream in = new FaweInputStream(new DataInputStream(new GZIPInputStream(new BufferedInputStream(new FileInputStream(file)))))) {
|
||||
|
||||
this.x = in.readShort();
|
||||
this.z = in.readShort();
|
||||
@ -222,62 +218,62 @@ public class StencilBrush extends Brush {
|
||||
|
||||
Files.createParentDirs(file);
|
||||
file.createNewFile();
|
||||
final FaweOutputStream out = new FaweOutputStream(new DataOutputStream(new PGZIPOutputStream(new BufferedOutputStream(new FileOutputStream(file)))));
|
||||
int blockPositionX = Math.min(this.firstPoint[0], this.secondPoint[0]);
|
||||
int blockPositionZ = Math.min(this.firstPoint[1], this.secondPoint[1]);
|
||||
int blockPositionY = Math.min(this.firstPoint[2], this.secondPoint[2]);
|
||||
out.writeShort(this.x);
|
||||
out.writeShort(this.z);
|
||||
out.writeShort(this.y);
|
||||
out.writeShort(this.xRef);
|
||||
out.writeShort(this.zRef);
|
||||
out.writeShort(this.yRef);
|
||||
try (FaweOutputStream out = new FaweOutputStream(new DataOutputStream(new PGZIPOutputStream(new BufferedOutputStream(new FileOutputStream(file)))))) {
|
||||
int blockPositionX = Math.min(this.firstPoint[0], this.secondPoint[0]);
|
||||
int blockPositionZ = Math.min(this.firstPoint[1], this.secondPoint[1]);
|
||||
int blockPositionY = Math.min(this.firstPoint[2], this.secondPoint[2]);
|
||||
out.writeShort(this.x);
|
||||
out.writeShort(this.z);
|
||||
out.writeShort(this.y);
|
||||
out.writeShort(this.xRef);
|
||||
out.writeShort(this.zRef);
|
||||
out.writeShort(this.yRef);
|
||||
|
||||
v.sendMessage(ChatColor.AQUA + "Volume: " + this.x * this.z * this.y + " blockPositionX:" + blockPositionX + " blockPositionZ:" + blockPositionZ + " blockPositionY:" + blockPositionY);
|
||||
v.sendMessage(ChatColor.AQUA + "Volume: " + this.x * this.z * this.y + " blockPositionX:" + blockPositionX + " blockPositionZ:" + blockPositionZ + " blockPositionY:" + blockPositionY);
|
||||
|
||||
int[] blockArray = new int[this.x * this.z * this.y];
|
||||
byte[] runSizeArray = new byte[this.x * this.z * this.y];
|
||||
int[] blockArray = new int[this.x * this.z * this.y];
|
||||
byte[] runSizeArray = new byte[this.x * this.z * this.y];
|
||||
|
||||
int lastId = (this.getWorld().getBlockAt(blockPositionX, blockPositionY, blockPositionZ).getCombinedId());
|
||||
int thisId;
|
||||
int counter = 0;
|
||||
int arrayIndex = 0;
|
||||
for (int y = 0; y < this.y; y++) {
|
||||
for (int z = 0; z < this.z; z++) {
|
||||
for (int x = 0; x < this.x; x++) {
|
||||
AsyncBlock currentBlock = getWorld().getBlockAt(blockPositionX + x, blockPositionY + y, blockPositionZ + z);
|
||||
thisId = (currentBlock.getCombinedId());
|
||||
if (thisId != lastId || counter == 255) {
|
||||
blockArray[arrayIndex] = lastId;
|
||||
runSizeArray[arrayIndex] = (byte) (counter - 128);
|
||||
arrayIndex++;
|
||||
counter = 1;
|
||||
lastId = thisId;
|
||||
} else {
|
||||
counter++;
|
||||
lastId = thisId;
|
||||
int lastId = (this.getWorld().getBlockAt(blockPositionX, blockPositionY, blockPositionZ).getCombinedId());
|
||||
int thisId;
|
||||
int counter = 0;
|
||||
int arrayIndex = 0;
|
||||
for (int y = 0; y < this.y; y++) {
|
||||
for (int z = 0; z < this.z; z++) {
|
||||
for (int x = 0; x < this.x; x++) {
|
||||
AsyncBlock currentBlock = getWorld().getBlockAt(blockPositionX + x, blockPositionY + y, blockPositionZ + z);
|
||||
thisId = (currentBlock.getCombinedId());
|
||||
if (thisId != lastId || counter == 255) {
|
||||
blockArray[arrayIndex] = lastId;
|
||||
runSizeArray[arrayIndex] = (byte) (counter - 128);
|
||||
arrayIndex++;
|
||||
counter = 1;
|
||||
lastId = thisId;
|
||||
} else {
|
||||
counter++;
|
||||
lastId = thisId;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
blockArray[arrayIndex] = lastId; // saving last run, which will always be left over.
|
||||
runSizeArray[arrayIndex] = (byte) (counter - 128);
|
||||
blockArray[arrayIndex] = lastId; // saving last run, which will always be left over.
|
||||
runSizeArray[arrayIndex] = (byte) (counter - 128);
|
||||
|
||||
out.writeInt(arrayIndex + 1);
|
||||
// v.sendMessage("number of runs = " + arrayIndex);
|
||||
for (int i = 0; i < arrayIndex + 1; i++) {
|
||||
if (runSizeArray[i] > -127) {
|
||||
out.writeBoolean(true);
|
||||
out.writeByte(runSizeArray[i]);
|
||||
out.writeVarInt(blockArray[i]);
|
||||
} else {
|
||||
out.writeBoolean(false);
|
||||
out.writeVarInt(blockArray[i]);
|
||||
out.writeInt(arrayIndex + 1);
|
||||
// v.sendMessage("number of runs = " + arrayIndex);
|
||||
for (int i = 0; i < arrayIndex + 1; i++) {
|
||||
if (runSizeArray[i] > -127) {
|
||||
out.writeBoolean(true);
|
||||
out.writeByte(runSizeArray[i]);
|
||||
out.writeVarInt(blockArray[i]);
|
||||
} else {
|
||||
out.writeBoolean(false);
|
||||
out.writeVarInt(blockArray[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
v.sendMessage(ChatColor.BLUE + "Saved as '" + this.filename + "'.");
|
||||
out.close();
|
||||
v.sendMessage(ChatColor.BLUE + "Saved as '" + this.filename + "'.");
|
||||
}
|
||||
|
||||
} catch (final Exception exception) {
|
||||
v.sendMessage(ChatColor.RED + "Something went wrong.");
|
||||
|
@ -12,9 +12,6 @@ import java.io.FileInputStream;
|
||||
import java.util.HashMap;
|
||||
import java.util.Scanner;
|
||||
|
||||
/**
|
||||
* @author Gavjenks
|
||||
*/
|
||||
public class StencilListBrush extends Brush {
|
||||
private byte pasteOption = 1; // 0 = full, 1 = fill, 2 = replace
|
||||
private String filename = "NoFileLoaded";
|
||||
@ -31,13 +28,13 @@ public class StencilListBrush extends Brush {
|
||||
this.setName("StencilList");
|
||||
}
|
||||
|
||||
private String readRandomStencil(final SnipeData v) {
|
||||
private String readRandomStencil() {
|
||||
double rand = Math.random() * (this.stencilList.size());
|
||||
final int choice = (int) rand;
|
||||
return this.stencilList.get(choice);
|
||||
}
|
||||
|
||||
private void readStencilList(final String listname, final SnipeData v) {
|
||||
private void readStencilList() {
|
||||
final File file = new File("plugins/VoxelSniper/stencilLists/" + this.filename + ".txt");
|
||||
if (file.exists()) {
|
||||
try {
|
||||
@ -61,16 +58,14 @@ public class StencilListBrush extends Brush {
|
||||
return;
|
||||
}
|
||||
|
||||
final String stencilName = this.readRandomStencil(v);
|
||||
final String stencilName = this.readRandomStencil();
|
||||
v.sendMessage(stencilName);
|
||||
|
||||
final Undo undo = new Undo();
|
||||
final File file = new File("plugins/VoxelSniper/stencils/" + stencilName + ".vstencil");
|
||||
|
||||
if (file.exists()) {
|
||||
try {
|
||||
final DataInputStream in = new DataInputStream(new BufferedInputStream(new FileInputStream(file)));
|
||||
|
||||
try (final DataInputStream in = new DataInputStream(new BufferedInputStream(new FileInputStream(file)))){
|
||||
this.x = in.readShort();
|
||||
this.z = in.readShort();
|
||||
this.y = in.readShort();
|
||||
@ -221,14 +216,13 @@ public class StencilListBrush extends Brush {
|
||||
return;
|
||||
}
|
||||
|
||||
final String stencilName = this.readRandomStencil(v);
|
||||
final String stencilName = this.readRandomStencil();
|
||||
|
||||
final Undo undo = new Undo();
|
||||
final File file = new File("plugins/VoxelSniper/stencils/" + stencilName + ".vstencil");
|
||||
|
||||
if (file.exists()) {
|
||||
try {
|
||||
final DataInputStream in = new DataInputStream(new BufferedInputStream(new FileInputStream(file)));
|
||||
try (final DataInputStream in = new DataInputStream(new BufferedInputStream(new FileInputStream(file)))) {
|
||||
|
||||
this.x = in.readShort();
|
||||
this.z = in.readShort();
|
||||
@ -380,14 +374,13 @@ public class StencilListBrush extends Brush {
|
||||
return;
|
||||
}
|
||||
|
||||
final String stencilName = this.readRandomStencil(v);
|
||||
final String stencilName = this.readRandomStencil();
|
||||
|
||||
final Undo undo = new Undo();
|
||||
final File file = new File("plugins/VoxelSniper/stencils/" + stencilName + ".vstencil");
|
||||
|
||||
if (file.exists()) {
|
||||
try {
|
||||
final DataInputStream in = new DataInputStream(new BufferedInputStream(new FileInputStream(file)));
|
||||
try (final DataInputStream in = new DataInputStream(new BufferedInputStream(new FileInputStream(file)))) {
|
||||
|
||||
this.x = in.readShort();
|
||||
this.z = in.readShort();
|
||||
@ -547,7 +540,7 @@ public class StencilListBrush extends Brush {
|
||||
return;
|
||||
}
|
||||
|
||||
final String stencilName = this.readRandomStencil(v);
|
||||
final String stencilName = this.readRandomStencil();
|
||||
|
||||
final Undo undo = new Undo();
|
||||
final File file = new File("plugins/VoxelSniper/stencils/" + stencilName + ".vstencil");
|
||||
@ -701,7 +694,7 @@ public class StencilListBrush extends Brush {
|
||||
|
||||
private void stencilPasteRotation(final SnipeData v) {
|
||||
// just randomly chooses a rotation and then calls stencilPaste.
|
||||
this.readStencilList(this.filename, v);
|
||||
this.readStencilList();
|
||||
final double random = Math.random();
|
||||
if (random < 0.26) {
|
||||
this.stencilPaste(v);
|
||||
@ -753,7 +746,7 @@ public class StencilListBrush extends Brush {
|
||||
final File file = new File("plugins/VoxelSniper/stencilLists/" + this.filename + ".txt");
|
||||
if (file.exists()) {
|
||||
v.sendMessage(ChatColor.RED + "Stencil List '" + this.filename + "' exists and was loaded.");
|
||||
this.readStencilList(this.filename, v);
|
||||
this.readStencilList();
|
||||
} else {
|
||||
v.sendMessage(ChatColor.AQUA + "Stencil List '" + this.filename + "' does not exist. This brush will not function without a valid stencil list.");
|
||||
this.filename = "NoFileLoaded";
|
||||
|
@ -7,9 +7,6 @@ import org.bukkit.ChatColor;
|
||||
import org.bukkit.util.NumberConversions;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
/**
|
||||
* @author Giltwist
|
||||
*/
|
||||
public class ThreePointCircleBrush extends PerformBrush {
|
||||
private Vector coordsOne;
|
||||
private Vector coordsTwo;
|
||||
@ -157,12 +154,12 @@ public class ThreePointCircleBrush extends PerformBrush {
|
||||
public final void parameters(final String[] par, final SnipeData v) {
|
||||
if (par[1].equalsIgnoreCase("info")) {
|
||||
v.sendMessage(ChatColor.YELLOW + "3-Point Circle Brush instructions: Select three corners with the arrow brush, then generate the Circle with the powder brush.");
|
||||
String toleranceOptions = "";
|
||||
StringBuilder toleranceOptions = new StringBuilder();
|
||||
for (final Tolerance tolerance : Tolerance.values()) {
|
||||
if (!toleranceOptions.isEmpty()) {
|
||||
toleranceOptions += "|";
|
||||
if (toleranceOptions.length() > 0) {
|
||||
toleranceOptions.append("|");
|
||||
}
|
||||
toleranceOptions += tolerance.name().toLowerCase();
|
||||
toleranceOptions.append(tolerance.name().toLowerCase());
|
||||
}
|
||||
v.sendMessage(ChatColor.GOLD + "/b tpc " + toleranceOptions + " -- Toggle the calculations to emphasize accuracy or smoothness");
|
||||
return;
|
||||
@ -191,7 +188,9 @@ public class ThreePointCircleBrush extends PerformBrush {
|
||||
* @author MikeMatrix
|
||||
*/
|
||||
private enum Tolerance {
|
||||
DEFAULT(1000), ACCURATE(10), SMOOTH(2000);
|
||||
DEFAULT(1000),
|
||||
ACCURATE(10),
|
||||
SMOOTH(2000);
|
||||
private int value;
|
||||
|
||||
Tolerance(final int value) {
|
||||
|
@ -12,10 +12,6 @@ import org.bukkit.Material;
|
||||
import org.bukkit.TreeType;
|
||||
import org.bukkit.block.BlockFace;
|
||||
|
||||
|
||||
/**
|
||||
* @author Mick
|
||||
*/
|
||||
public class TreeSnipeBrush extends Brush {
|
||||
private TreeType treeType = TreeType.TREE;
|
||||
|
||||
|
@ -5,9 +5,6 @@ import com.thevoxelbox.voxelsniper.SnipeData;
|
||||
import com.thevoxelbox.voxelsniper.brush.perform.PerformBrush;
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
/**
|
||||
* @author Giltwist
|
||||
*/
|
||||
public class TriangleBrush extends PerformBrush {
|
||||
private double[] coordsOne = new double[3]; // Three corners
|
||||
private double[] coordsTwo = new double[3];
|
||||
|
@ -7,10 +7,6 @@ import com.thevoxelbox.voxelsniper.SnipeData;
|
||||
import com.thevoxelbox.voxelsniper.brush.perform.PerformBrush;
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
/**
|
||||
* @author jmck95 Credit to GavJenks for framework and 95 of code. Big Thank you to GavJenks
|
||||
*/
|
||||
|
||||
public class UnderlayBrush extends PerformBrush {
|
||||
private static final int DEFAULT_DEPTH = 3;
|
||||
private int depth = DEFAULT_DEPTH;
|
||||
@ -43,8 +39,6 @@ public class UnderlayBrush extends PerformBrush {
|
||||
}
|
||||
break;
|
||||
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
for (int d = 0; (d < this.depth); d++) {
|
||||
@ -86,8 +80,6 @@ public class UnderlayBrush extends PerformBrush {
|
||||
memory[x + v.getBrushSize()][z + v.getBrushSize()] = 1; // stop it from checking any other blocks in this vertical 1x1 column.
|
||||
}
|
||||
break;
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
for (int d = -1; (d < this.depth - 1); d++) {
|
||||
|
@ -7,16 +7,12 @@ import org.bukkit.ChatColor;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockFace;
|
||||
|
||||
/**
|
||||
* @author Gavjenks
|
||||
*/
|
||||
public class VoltMeterBrush extends Brush {
|
||||
|
||||
public VoltMeterBrush() {
|
||||
this.setName("VoltMeter");
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private void data(final SnipeData v) {
|
||||
final AsyncBlock block = this.clampY(this.getTargetBlock().getX(), this.getTargetBlock().getY(), this.getTargetBlock().getZ());
|
||||
final int data = block.getPropertyId();
|
||||
|
@ -4,9 +4,7 @@ import com.thevoxelbox.voxelsniper.Message;
|
||||
import com.thevoxelbox.voxelsniper.SnipeData;
|
||||
import com.thevoxelbox.voxelsniper.brush.perform.PerformBrush;
|
||||
|
||||
/**
|
||||
* @author Piotr
|
||||
*/
|
||||
|
||||
public class VoxelBrush extends PerformBrush {
|
||||
|
||||
public VoxelBrush() {
|
||||
|
@ -5,9 +5,7 @@ import com.thevoxelbox.voxelsniper.Message;
|
||||
import com.thevoxelbox.voxelsniper.SnipeData;
|
||||
import com.thevoxelbox.voxelsniper.brush.perform.PerformBrush;
|
||||
|
||||
/**
|
||||
* @author Voxel
|
||||
*/
|
||||
|
||||
public class VoxelDiscBrush extends PerformBrush {
|
||||
|
||||
public VoxelDiscBrush() {
|
||||
|
@ -6,9 +6,7 @@ import com.thevoxelbox.voxelsniper.brush.perform.PerformBrush;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockFace;
|
||||
|
||||
/**
|
||||
* @author Voxel
|
||||
*/
|
||||
|
||||
public class VoxelDiscFaceBrush extends PerformBrush {
|
||||
|
||||
public VoxelDiscFaceBrush() {
|
||||
|
@ -1,26 +1,26 @@
|
||||
/**
|
||||
This file is part of VoxelSniper, licensed under the MIT License (MIT).
|
||||
/*
|
||||
This file is part of VoxelSniper, licensed under the MIT License (MIT).
|
||||
|
||||
Copyright (c) The VoxelBox <http://thevoxelbox.com>
|
||||
Copyright (c) contributors
|
||||
Copyright (c) The VoxelBox <http://thevoxelbox.com>
|
||||
Copyright (c) contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
package com.thevoxelbox.voxelsniper.brush;
|
||||
|
||||
@ -32,19 +32,12 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
/**
|
||||
* @author MikeMatrix
|
||||
*/
|
||||
public class WarpBrush extends Brush {
|
||||
|
||||
public WarpBrush() {
|
||||
this.setName("Warp");
|
||||
}
|
||||
|
||||
public static Class<?> inject() {
|
||||
return WarpBrush.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void info(final Message vm) {
|
||||
vm.brushName(this.getName());
|
||||
@ -86,4 +79,4 @@ public class WarpBrush extends Brush {
|
||||
public String getPermissionNode() {
|
||||
return "voxelsniper.brush.warp";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,26 +1,26 @@
|
||||
/**
|
||||
* This file is part of VoxelSniper, licensed under the MIT License (MIT).
|
||||
* <p>
|
||||
* Copyright (c) The VoxelBox <http://thevoxelbox.com>
|
||||
* Copyright (c) contributors
|
||||
* <p>
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
* <p>
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
* <p>
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
/*
|
||||
This file is part of VoxelSniper, licensed under the MIT License (MIT).
|
||||
<p>
|
||||
Copyright (c) The VoxelBox <http://thevoxelbox.com>
|
||||
Copyright (c) contributors
|
||||
<p>
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
<p>
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
<p>
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
package com.thevoxelbox.voxelsniper.brush.perform;
|
||||
|
||||
|
@ -5,13 +5,12 @@
|
||||
package com.thevoxelbox.voxelsniper.brush.perform;
|
||||
|
||||
import com.thevoxelbox.voxelsniper.Message;
|
||||
import com.thevoxelbox.voxelsniper.SnipeData;
|
||||
|
||||
|
||||
/**
|
||||
* @author Voxel
|
||||
*/
|
||||
public interface Performer {
|
||||
|
||||
void parse(String[] args, com.thevoxelbox.voxelsniper.SnipeData v);
|
||||
void parse(String[] args, SnipeData v);
|
||||
|
||||
void showInfo(Message vm);
|
||||
}
|
||||
|
@ -12,9 +12,7 @@ import java.util.TreeMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
* @author Voxel
|
||||
*/
|
||||
|
||||
|
||||
/* The m/i/c system of naming performers: <placement-option>[replacement-option][extras]
|
||||
*
|
||||
|
@ -6,10 +6,8 @@ package com.thevoxelbox.voxelsniper.brush.perform;
|
||||
|
||||
import com.boydti.fawe.bukkit.wrapper.AsyncBlock;
|
||||
import com.thevoxelbox.voxelsniper.Message;
|
||||
import com.thevoxelbox.voxelsniper.SnipeData;
|
||||
|
||||
/**
|
||||
* @author Voxel
|
||||
*/
|
||||
public class pCombo extends vPerformer {
|
||||
|
||||
private int i;
|
||||
@ -27,7 +25,7 @@ public class pCombo extends vPerformer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(com.thevoxelbox.voxelsniper.SnipeData v) {
|
||||
public void init(SnipeData v) {
|
||||
w = v.getWorld();
|
||||
i = v.getVoxelId();
|
||||
d = v.getPropertyId();
|
||||
|
@ -6,10 +6,9 @@ package com.thevoxelbox.voxelsniper.brush.perform;
|
||||
|
||||
import com.boydti.fawe.bukkit.wrapper.AsyncBlock;
|
||||
import com.thevoxelbox.voxelsniper.Message;
|
||||
import com.thevoxelbox.voxelsniper.SnipeData;
|
||||
|
||||
|
||||
/**
|
||||
* @author Voxel
|
||||
*/
|
||||
public class pComboCombo extends vPerformer {
|
||||
|
||||
private int d;
|
||||
@ -22,7 +21,7 @@ public class pComboCombo extends vPerformer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(com.thevoxelbox.voxelsniper.SnipeData v) {
|
||||
public void init(SnipeData v) {
|
||||
w = v.getWorld();
|
||||
d = v.getPropertyId();
|
||||
dr = v.getReplaceData();
|
||||
|
@ -6,10 +6,9 @@ package com.thevoxelbox.voxelsniper.brush.perform;
|
||||
|
||||
import com.boydti.fawe.bukkit.wrapper.AsyncBlock;
|
||||
import com.thevoxelbox.voxelsniper.Message;
|
||||
import com.thevoxelbox.voxelsniper.SnipeData;
|
||||
|
||||
|
||||
/**
|
||||
* @author Voxel
|
||||
*/
|
||||
public class pComboComboNoPhys extends vPerformer {
|
||||
|
||||
private int d;
|
||||
@ -22,7 +21,7 @@ public class pComboComboNoPhys extends vPerformer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(com.thevoxelbox.voxelsniper.SnipeData v) {
|
||||
public void init(SnipeData v) {
|
||||
w = v.getWorld();
|
||||
d = v.getPropertyId();
|
||||
dr = v.getReplaceData();
|
||||
@ -53,4 +52,4 @@ public class pComboComboNoPhys extends vPerformer {
|
||||
public boolean isUsingReplaceMaterial() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6,10 +6,9 @@ package com.thevoxelbox.voxelsniper.brush.perform;
|
||||
|
||||
import com.boydti.fawe.bukkit.wrapper.AsyncBlock;
|
||||
import com.thevoxelbox.voxelsniper.Message;
|
||||
import com.thevoxelbox.voxelsniper.SnipeData;
|
||||
|
||||
|
||||
/**
|
||||
* @author Voxel
|
||||
*/
|
||||
public class pComboInk extends vPerformer {
|
||||
|
||||
private int d;
|
||||
@ -21,7 +20,7 @@ public class pComboInk extends vPerformer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(com.thevoxelbox.voxelsniper.SnipeData v) {
|
||||
public void init(SnipeData v) {
|
||||
w = v.getWorld();
|
||||
d = v.getPropertyId();
|
||||
dr = v.getReplaceData();
|
||||
|
@ -6,10 +6,9 @@ package com.thevoxelbox.voxelsniper.brush.perform;
|
||||
|
||||
import com.boydti.fawe.bukkit.wrapper.AsyncBlock;
|
||||
import com.thevoxelbox.voxelsniper.Message;
|
||||
import com.thevoxelbox.voxelsniper.SnipeData;
|
||||
|
||||
|
||||
/**
|
||||
* @author Voxel
|
||||
*/
|
||||
public class pComboInkNoPhys extends vPerformer {
|
||||
|
||||
private int d;
|
||||
@ -21,7 +20,7 @@ public class pComboInkNoPhys extends vPerformer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(com.thevoxelbox.voxelsniper.SnipeData v) {
|
||||
public void init(SnipeData v) {
|
||||
w = v.getWorld();
|
||||
d = v.getPropertyId();
|
||||
dr = v.getReplaceData();
|
||||
|
@ -6,10 +6,9 @@ package com.thevoxelbox.voxelsniper.brush.perform;
|
||||
|
||||
import com.boydti.fawe.bukkit.wrapper.AsyncBlock;
|
||||
import com.thevoxelbox.voxelsniper.Message;
|
||||
import com.thevoxelbox.voxelsniper.SnipeData;
|
||||
|
||||
|
||||
/**
|
||||
* @author Voxel
|
||||
*/
|
||||
public class pComboMat extends vPerformer {
|
||||
|
||||
private int d;
|
||||
@ -21,7 +20,7 @@ public class pComboMat extends vPerformer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(com.thevoxelbox.voxelsniper.SnipeData v) {
|
||||
public void init(SnipeData v) {
|
||||
w = v.getWorld();
|
||||
d = v.getPropertyId();
|
||||
i = v.getVoxelId();
|
||||
|
@ -6,10 +6,9 @@ package com.thevoxelbox.voxelsniper.brush.perform;
|
||||
|
||||
import com.boydti.fawe.bukkit.wrapper.AsyncBlock;
|
||||
import com.thevoxelbox.voxelsniper.Message;
|
||||
import com.thevoxelbox.voxelsniper.SnipeData;
|
||||
|
||||
|
||||
/**
|
||||
* @author Voxel
|
||||
*/
|
||||
public class pComboMatNoPhys extends vPerformer {
|
||||
|
||||
private int d;
|
||||
@ -21,7 +20,7 @@ public class pComboMatNoPhys extends vPerformer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(com.thevoxelbox.voxelsniper.SnipeData v) {
|
||||
public void init(SnipeData v) {
|
||||
w = v.getWorld();
|
||||
d = v.getPropertyId();
|
||||
i = v.getVoxelId();
|
||||
|
@ -6,10 +6,9 @@ package com.thevoxelbox.voxelsniper.brush.perform;
|
||||
|
||||
import com.boydti.fawe.bukkit.wrapper.AsyncBlock;
|
||||
import com.thevoxelbox.voxelsniper.Message;
|
||||
import com.thevoxelbox.voxelsniper.SnipeData;
|
||||
|
||||
|
||||
/**
|
||||
* @author Voxel
|
||||
*/
|
||||
public class pComboNoPhys extends vPerformer {
|
||||
|
||||
private int i;
|
||||
@ -27,7 +26,7 @@ public class pComboNoPhys extends vPerformer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(com.thevoxelbox.voxelsniper.SnipeData v) {
|
||||
public void init(SnipeData v) {
|
||||
w = v.getWorld();
|
||||
i = v.getVoxelId();
|
||||
d = v.getPropertyId();
|
||||
|
@ -6,10 +6,9 @@ package com.thevoxelbox.voxelsniper.brush.perform;
|
||||
|
||||
import com.boydti.fawe.bukkit.wrapper.AsyncBlock;
|
||||
import com.thevoxelbox.voxelsniper.Message;
|
||||
import com.thevoxelbox.voxelsniper.SnipeData;
|
||||
|
||||
|
||||
/**
|
||||
* @author Voxel
|
||||
*/
|
||||
public class pComboNoUndo extends vPerformer {
|
||||
|
||||
private int i;
|
||||
@ -20,7 +19,7 @@ public class pComboNoUndo extends vPerformer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(com.thevoxelbox.voxelsniper.SnipeData v) {
|
||||
public void init(SnipeData v) {
|
||||
w = v.getWorld();
|
||||
i = v.getVoxelId();
|
||||
d = v.getPropertyId();
|
||||
@ -40,4 +39,4 @@ public class pComboNoUndo extends vPerformer {
|
||||
b.setTypeIdAndPropertyId(i, d, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6,11 +6,10 @@ package com.thevoxelbox.voxelsniper.brush.perform;
|
||||
|
||||
import com.boydti.fawe.bukkit.wrapper.AsyncBlock;
|
||||
import com.thevoxelbox.voxelsniper.Message;
|
||||
import com.thevoxelbox.voxelsniper.SnipeData;
|
||||
import com.thevoxelbox.voxelsniper.util.VoxelList;
|
||||
|
||||
/**
|
||||
* @author Voxel
|
||||
*/
|
||||
|
||||
public class pExcludeCombo extends vPerformer {
|
||||
|
||||
private VoxelList excludeList;
|
||||
@ -30,7 +29,7 @@ public class pExcludeCombo extends vPerformer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(com.thevoxelbox.voxelsniper.SnipeData v) {
|
||||
public void init(SnipeData v) {
|
||||
w = v.getWorld();
|
||||
id = v.getVoxelId();
|
||||
data = v.getPropertyId();
|
||||
|
@ -6,11 +6,10 @@ package com.thevoxelbox.voxelsniper.brush.perform;
|
||||
|
||||
import com.boydti.fawe.bukkit.wrapper.AsyncBlock;
|
||||
import com.thevoxelbox.voxelsniper.Message;
|
||||
import com.thevoxelbox.voxelsniper.SnipeData;
|
||||
import com.thevoxelbox.voxelsniper.util.VoxelList;
|
||||
|
||||
/**
|
||||
* @author Voxel
|
||||
*/
|
||||
|
||||
public class pExcludeInk extends vPerformer {
|
||||
|
||||
private VoxelList excludeList;
|
||||
@ -28,7 +27,7 @@ public class pExcludeInk extends vPerformer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(com.thevoxelbox.voxelsniper.SnipeData v) {
|
||||
public void init(SnipeData v) {
|
||||
w = v.getWorld();
|
||||
data = v.getPropertyId();
|
||||
excludeList = v.getVoxelList();
|
||||
|
@ -6,11 +6,10 @@ package com.thevoxelbox.voxelsniper.brush.perform;
|
||||
|
||||
import com.boydti.fawe.bukkit.wrapper.AsyncBlock;
|
||||
import com.thevoxelbox.voxelsniper.Message;
|
||||
import com.thevoxelbox.voxelsniper.SnipeData;
|
||||
import com.thevoxelbox.voxelsniper.util.VoxelList;
|
||||
|
||||
/**
|
||||
* @author Voxel
|
||||
*/
|
||||
|
||||
public class pExcludeMat extends vPerformer {
|
||||
|
||||
private VoxelList excludeList;
|
||||
@ -28,7 +27,7 @@ public class pExcludeMat extends vPerformer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(com.thevoxelbox.voxelsniper.SnipeData v) {
|
||||
public void init(SnipeData v) {
|
||||
w = v.getWorld();
|
||||
id = v.getVoxelId();
|
||||
excludeList = v.getVoxelList();
|
||||
|
@ -6,11 +6,10 @@ package com.thevoxelbox.voxelsniper.brush.perform;
|
||||
|
||||
import com.boydti.fawe.bukkit.wrapper.AsyncBlock;
|
||||
import com.thevoxelbox.voxelsniper.Message;
|
||||
import com.thevoxelbox.voxelsniper.SnipeData;
|
||||
import com.thevoxelbox.voxelsniper.util.VoxelList;
|
||||
|
||||
/**
|
||||
* @author Voxel
|
||||
*/
|
||||
|
||||
public class pIncludeCombo extends vPerformer {
|
||||
|
||||
private VoxelList includeList;
|
||||
@ -30,7 +29,7 @@ public class pIncludeCombo extends vPerformer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(com.thevoxelbox.voxelsniper.SnipeData v) {
|
||||
public void init(SnipeData v) {
|
||||
w = v.getWorld();
|
||||
id = v.getVoxelId();
|
||||
data = v.getPropertyId();
|
||||
|
@ -6,11 +6,10 @@ package com.thevoxelbox.voxelsniper.brush.perform;
|
||||
|
||||
import com.boydti.fawe.bukkit.wrapper.AsyncBlock;
|
||||
import com.thevoxelbox.voxelsniper.Message;
|
||||
import com.thevoxelbox.voxelsniper.SnipeData;
|
||||
import com.thevoxelbox.voxelsniper.util.VoxelList;
|
||||
|
||||
/**
|
||||
* @author Voxel
|
||||
*/
|
||||
|
||||
public class pIncludeInk extends vPerformer {
|
||||
|
||||
private VoxelList includeList;
|
||||
@ -28,7 +27,7 @@ public class pIncludeInk extends vPerformer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(com.thevoxelbox.voxelsniper.SnipeData v) {
|
||||
public void init(SnipeData v) {
|
||||
w = v.getWorld();
|
||||
data = v.getPropertyId();
|
||||
includeList = v.getVoxelList();
|
||||
|
@ -6,11 +6,10 @@ package com.thevoxelbox.voxelsniper.brush.perform;
|
||||
|
||||
import com.boydti.fawe.bukkit.wrapper.AsyncBlock;
|
||||
import com.thevoxelbox.voxelsniper.Message;
|
||||
import com.thevoxelbox.voxelsniper.SnipeData;
|
||||
import com.thevoxelbox.voxelsniper.util.VoxelList;
|
||||
|
||||
/**
|
||||
* @author Voxel
|
||||
*/
|
||||
|
||||
public class pIncludeMat extends vPerformer {
|
||||
|
||||
private VoxelList includeList;
|
||||
@ -28,7 +27,7 @@ public class pIncludeMat extends vPerformer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(com.thevoxelbox.voxelsniper.SnipeData v) {
|
||||
public void init(SnipeData v) {
|
||||
w = v.getWorld();
|
||||
id = v.getVoxelId();
|
||||
includeList = v.getVoxelList();
|
||||
|
@ -6,10 +6,9 @@ package com.thevoxelbox.voxelsniper.brush.perform;
|
||||
|
||||
import com.boydti.fawe.bukkit.wrapper.AsyncBlock;
|
||||
import com.thevoxelbox.voxelsniper.Message;
|
||||
import com.thevoxelbox.voxelsniper.SnipeData;
|
||||
|
||||
|
||||
/**
|
||||
* @author Voxel
|
||||
*/
|
||||
public class pInk extends vPerformer {
|
||||
|
||||
private int d;
|
||||
@ -19,7 +18,7 @@ public class pInk extends vPerformer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(com.thevoxelbox.voxelsniper.SnipeData v) {
|
||||
public void init(SnipeData v) {
|
||||
w = v.getWorld();
|
||||
d = v.getPropertyId();
|
||||
}
|
||||
|
@ -6,10 +6,9 @@ package com.thevoxelbox.voxelsniper.brush.perform;
|
||||
|
||||
import com.boydti.fawe.bukkit.wrapper.AsyncBlock;
|
||||
import com.thevoxelbox.voxelsniper.Message;
|
||||
import com.thevoxelbox.voxelsniper.SnipeData;
|
||||
|
||||
|
||||
/**
|
||||
* @author Voxel
|
||||
*/
|
||||
public class pInkCombo extends vPerformer {
|
||||
|
||||
private int d;
|
||||
@ -21,7 +20,7 @@ public class pInkCombo extends vPerformer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(com.thevoxelbox.voxelsniper.SnipeData v) {
|
||||
public void init(SnipeData v) {
|
||||
w = v.getWorld();
|
||||
d = v.getPropertyId();
|
||||
dr = v.getReplaceData();
|
||||
|
Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren