As Jesse would say... *

Dieser Commit ist enthalten in:
MattBDev 2019-06-20 20:05:18 -04:00
Ursprung 9d1117303c
Commit 0313320816
146 geänderte Dateien mit 906 neuen und 2252 gelöschten Zeilen

Datei anzeigen

@ -1,4 +1,4 @@
/** /*
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) The VoxelBox <http://thevoxelbox.com>

Datei anzeigen

@ -1,4 +1,4 @@
/** /*
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) The VoxelBox <http://thevoxelbox.com>
@ -33,9 +33,6 @@ import org.bukkit.ChatColor;
import org.bukkit.World; import org.bukkit.World;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
/**
* @author Piotr
*/
public class SnipeData { public class SnipeData {
public static final int DEFAULT_REPLACE_DATA_VALUE = 0; public static final int DEFAULT_REPLACE_DATA_VALUE = 0;
@ -87,9 +84,6 @@ public class SnipeData {
private Pattern pattern; private Pattern pattern;
private String patternInfo; private String patternInfo;
/**
* @param vs
*/
public SnipeData(final Sniper vs) { public SnipeData(final Sniper vs) {
this.owner = vs; this.owner = vs;
} }
@ -219,9 +213,6 @@ public class SnipeData {
this.voxelList = new VoxelList(); this.voxelList = new VoxelList();
} }
/**
* @param message
*/
public final void sendMessage(final String message) { public final void sendMessage(final String message) {
this.owner.getPlayer().sendMessage(message); this.owner.getPlayer().sendMessage(message);
} }

Datei anzeigen

@ -1,4 +1,4 @@
/** /*
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) The VoxelBox <http://thevoxelbox.com>

Datei anzeigen

@ -17,9 +17,7 @@ import org.bukkit.event.player.PlayerJoinEvent;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
/**
* @author Voxel
*/
public class VoxelSniperListener implements Listener { public class VoxelSniperListener implements Listener {
private static final String SNIPER_PERMISSION = "voxelsniper.sniper"; private static final String SNIPER_PERMISSION = "voxelsniper.sniper";

Datei anzeigen

@ -8,6 +8,7 @@ import org.bukkit.ChatColor;
/** /**
* A brush that creates a solid ball. * A brush that creates a solid ball.
*
* @author Piotr * @author Piotr
*/ */
public class BallBrush extends PerformBrush { public class BallBrush extends PerformBrush {
@ -15,10 +16,7 @@ public class BallBrush extends PerformBrush {
public static final int TRUE_CIRCLE_OFF_VALUE = 0; public static final int TRUE_CIRCLE_OFF_VALUE = 0;
private double trueCircle = 0; private double trueCircle = 0;
/** public BallBrush() {
*
*/
public BallBrush() {
this.setName("Ball"); this.setName("Ball");
} }

Datei anzeigen

@ -9,6 +9,7 @@ import org.bukkit.block.Block;
public class BiomeBrush extends Brush { public class BiomeBrush extends Brush {
private Biome selectedBiome = Biome.PLAINS; private Biome selectedBiome = Biome.PLAINS;
public BiomeBrush() { public BiomeBrush() {
this.setName("Biome (/b biome [Biome Name])"); this.setName("Biome (/b biome [Biome Name])");
} }

Datei anzeigen

@ -4,17 +4,10 @@ import com.thevoxelbox.voxelsniper.Message;
import com.thevoxelbox.voxelsniper.SnipeData; import com.thevoxelbox.voxelsniper.SnipeData;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
/**
* @author Monofraps
*/
@SuppressWarnings("deprecation")
public abstract class BlendBrushBase extends Brush { public abstract class BlendBrushBase extends Brush {
protected boolean excludeAir = true; protected boolean excludeAir = true;
protected boolean excludeWater = true; protected boolean excludeWater = true;
/**
* @param v
*/
protected abstract void blend(final SnipeData v); protected abstract void blend(final SnipeData v);
@Override @Override
@ -47,30 +40,18 @@ public abstract class BlendBrushBase extends Brush {
} }
} }
/**
* @return
*/
protected final boolean isExcludeAir() { protected final boolean isExcludeAir() {
return excludeAir; return excludeAir;
} }
/**
* @param excludeAir
*/
protected final void setExcludeAir(boolean excludeAir) { protected final void setExcludeAir(boolean excludeAir) {
this.excludeAir = excludeAir; this.excludeAir = excludeAir;
} }
/**
* @return
*/
protected final boolean isExcludeWater() { protected final boolean isExcludeWater() {
return excludeWater; return excludeWater;
} }
/**
* @param excludeWater
*/
protected final void setExcludeWater(boolean excludeWater) { protected final void setExcludeWater(boolean excludeWater) {
this.excludeWater = excludeWater; this.excludeWater = excludeWater;
} }

Datei anzeigen

@ -7,9 +7,6 @@ import org.bukkit.ChatColor;
import java.util.Random; import java.util.Random;
/**
* @author Giltwist
*/
public class BlobBrush extends PerformBrush { public class BlobBrush extends PerformBrush {
private static final int GROW_PERCENT_DEFAULT = 1000; private static final int GROW_PERCENT_DEFAULT = 1000;
private static final int GROW_PERCENT_MIN = 1; private static final int GROW_PERCENT_MIN = 1;

Datei anzeigen

@ -7,9 +7,6 @@ import org.bukkit.block.Block;
import java.util.ArrayList; import java.util.ArrayList;
/**
* @author MikeMatrix
*/
public class BlockResetBrush extends Brush { public class BlockResetBrush extends Brush {
private static final ArrayList<Material> DENIED_UPDATES = new ArrayList<>(); private static final ArrayList<Material> DENIED_UPDATES = new ArrayList<>();

Datei anzeigen

@ -9,29 +9,26 @@ import com.thevoxelbox.voxelsniper.SnipeData;
import org.bukkit.Material; 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 * 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 * 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 * 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, * 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 * 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, * 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 * 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 * 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 * 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 * 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. * brushes.
* *
* @author GavJenks * @author GavJenks
*/ */
public class BlockResetSurfaceBrush extends Brush { public class BlockResetSurfaceBrush extends Brush {
/**
*
*/
public BlockResetSurfaceBrush() { public BlockResetSurfaceBrush() {
this.setName("Block Reset Brush Surface Only"); this.setName("Block Reset Brush Surface Only");
} }
@SuppressWarnings("deprecation")
private void applyBrush(final SnipeData v) { private void applyBrush(final SnipeData v) {
final AsyncWorld world = this.getWorld(); final AsyncWorld world = this.getWorld();

Datei anzeigen

@ -123,7 +123,7 @@ public abstract class Brush implements IBrush {
} else { } else {
RangeBlockHelper rangeBlockHelper; RangeBlockHelper rangeBlockHelper;
if (v.owner().getSnipeData(v.owner().getCurrentToolId()).isRanged()) { 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()); this.setTargetBlock(rangeBlockHelper.getRangeBlock());
} else { } else {
rangeBlockHelper = new RangeBlockHelper(v.owner().getPlayer(), v.owner().getWorld()); rangeBlockHelper = new RangeBlockHelper(v.owner().getPlayer(), v.owner().getWorld());
@ -190,7 +190,6 @@ public abstract class Brush implements IBrush {
* @param z Z coordinate * @param z Z coordinate
* @return Type ID of Block at given coordinates in the world of the targeted Block. * @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) { protected int getBlockIdAt(int x, int y, int z) {
return getWorld().getBlockAt(x, y, z).getTypeId(); return getWorld().getBlockAt(x, y, z).getTypeId();
} }

Datei anzeigen

@ -11,9 +11,7 @@ import org.bukkit.Chunk;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.block.Block; import org.bukkit.block.Block;
/**
* @author Voxel
*/
public class CanyonBrush extends Brush { public class CanyonBrush extends Brush {
private static final int SHIFT_LEVEL_MIN = 10; private static final int SHIFT_LEVEL_MIN = 10;
private static final int SHIFT_LEVEL_MAX = 60; private static final int SHIFT_LEVEL_MAX = 60;
@ -23,10 +21,6 @@ public class CanyonBrush extends Brush {
this.setName("Canyon"); this.setName("Canyon");
} }
/**
* @param chunk
* @param undo
*/
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
protected final void canyon(final AsyncChunk chunk, final Undo undo) { protected final void canyon(final AsyncChunk chunk, final Undo undo) {
for (int x = 0; x < CHUNK_SIZE; x++) { for (int x = 0; x < CHUNK_SIZE; x++) {

Datei anzeigen

@ -6,9 +6,7 @@ import com.thevoxelbox.voxelsniper.Undo;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.Chunk; import org.bukkit.Chunk;
/**
* @author Voxel
*/
public class CanyonSelectionBrush extends CanyonBrush { public class CanyonSelectionBrush extends CanyonBrush {
private boolean first = true; private boolean first = true;
private int fx; private int fx;

Datei anzeigen

@ -6,9 +6,6 @@ import com.thevoxelbox.voxelsniper.brush.perform.PerformBrush;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.block.Block; import org.bukkit.block.Block;
/**
* @author MikeMatrix
*/
public class CheckerVoxelDiscBrush extends PerformBrush { public class CheckerVoxelDiscBrush extends PerformBrush {
private boolean useWorldCoordinates = true; private boolean useWorldCoordinates = true;
@ -19,10 +16,6 @@ public class CheckerVoxelDiscBrush extends PerformBrush {
this.setName("Checker Voxel Disc"); this.setName("Checker Voxel Disc");
} }
/**
* @param v Snipe Data
* @param target
*/
private void applyBrush(final SnipeData v, final Block target) { private void applyBrush(final SnipeData v, final Block target) {
for (int x = v.getBrushSize(); x >= -v.getBrushSize(); x--) { for (int x = v.getBrushSize(); x >= -v.getBrushSize(); x--) {
for (int y = v.getBrushSize(); y >= -v.getBrushSize(); y--) { for (int y = v.getBrushSize(); y >= -v.getBrushSize(); y--) {

Datei anzeigen

@ -7,9 +7,6 @@ import com.thevoxelbox.voxelsniper.Undo;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.Material; import org.bukkit.Material;
/**
* @author psanker
*/
public class CleanSnowBrush extends Brush { public class CleanSnowBrush extends Brush {
private double trueCircle = 0; private double trueCircle = 0;

Datei anzeigen

@ -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. * 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 * @author Voxel
*/ */
public class CloneStampBrush extends StampBrush { public class CloneStampBrush extends StampBrush {
/** public CloneStampBrush() {
*
*/
public CloneStampBrush() {
this.setName("Clone"); this.setName("Clone");
} }
@ -107,7 +105,7 @@ public class CloneStampBrush extends StampBrush {
} }
@Override @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]; final String parameter = par[1];
if (parameter.equalsIgnoreCase("info")) { if (parameter.equalsIgnoreCase("info")) {

Datei anzeigen

@ -8,11 +8,6 @@ import org.bukkit.entity.LargeFireball;
import org.bukkit.entity.SmallFireball; import org.bukkit.entity.SmallFireball;
import org.bukkit.util.Vector; 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 { public class CometBrush extends Brush {
private boolean useBigBalls = false; private boolean useBigBalls = false;

Datei anzeigen

@ -7,9 +7,6 @@ import com.thevoxelbox.voxelsniper.SnipeData;
import com.thevoxelbox.voxelsniper.Undo; import com.thevoxelbox.voxelsniper.Undo;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
/**
* @author giltwist
*/
public class CopyPastaBrush extends Brush { public class CopyPastaBrush extends Brush {
private static final int BLOCK_LIMIT = 10000; private static final int BLOCK_LIMIT = 10000;
@ -29,7 +26,6 @@ public class CopyPastaBrush extends Brush {
this.setName("CopyPasta"); this.setName("CopyPasta");
} }
@SuppressWarnings("deprecation")
private void doCopy(final SnipeData v) { private void doCopy(final SnipeData v) {
for (int i = 0; i < 3; i++) { for (int i = 0; i < 3; i++) {
this.arraySize[i] = Math.abs(this.firstPoint[i] - this.secondPoint[i]) + 1; this.arraySize[i] = Math.abs(this.firstPoint[i] - this.secondPoint[i]) + 1;
@ -98,7 +94,7 @@ public class CopyPastaBrush extends Brush {
} }
@Override @Override
protected final void arrow(final com.thevoxelbox.voxelsniper.SnipeData v) { protected final void arrow(final SnipeData v) {
switch (this.points) { switch (this.points) {
case 0: case 0:
this.firstPoint[0] = this.getTargetBlock().getX(); this.firstPoint[0] = this.getTargetBlock().getX();
@ -126,7 +122,7 @@ public class CopyPastaBrush extends Brush {
} }
@Override @Override
protected final void powder(final com.thevoxelbox.voxelsniper.SnipeData v) { protected final void powder(final SnipeData v) {
if (this.points == 2) { if (this.points == 2) {
if (this.numBlocks == 0) { if (this.numBlocks == 0) {
this.doCopy(v); this.doCopy(v);
@ -151,7 +147,7 @@ public class CopyPastaBrush extends Brush {
} }
@Override @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]; final String parameter = par[1];
if (parameter.equalsIgnoreCase("info")) { if (parameter.equalsIgnoreCase("info")) {

Datei anzeigen

@ -6,9 +6,6 @@ import com.thevoxelbox.voxelsniper.brush.perform.PerformBrush;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.block.Block; import org.bukkit.block.Block;
/**
* @author Kavutop
*/
public class CylinderBrush extends PerformBrush { public class CylinderBrush extends PerformBrush {
private double trueCircle = 0; private double trueCircle = 0;

Datei anzeigen

@ -7,9 +7,6 @@ import org.bukkit.ChatColor;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
/**
* @author Voxel
*/
public class DiscBrush extends PerformBrush { public class DiscBrush extends PerformBrush {
private double trueCircle = 0; private double trueCircle = 0;

Datei anzeigen

@ -7,9 +7,6 @@ import com.thevoxelbox.voxelsniper.brush.perform.PerformBrush;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.block.BlockFace; import org.bukkit.block.BlockFace;
/**
* @author Voxel
*/
public class DiscFaceBrush extends PerformBrush { public class DiscFaceBrush extends PerformBrush {
private double trueCircle = 0; private double trueCircle = 0;

Datei anzeigen

@ -11,10 +11,6 @@ import org.bukkit.util.Vector;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
/**
* @author Gavjenks
* @author MikeMatrix
*/
public class DomeBrush extends Brush { public class DomeBrush extends Brush {
public DomeBrush() { public DomeBrush() {

Datei anzeigen

@ -6,10 +6,6 @@ import com.thevoxelbox.voxelsniper.SnipeData;
import com.thevoxelbox.voxelsniper.Undo; import com.thevoxelbox.voxelsniper.Undo;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
/**
* @author Gavjenks
* @author psanker
*/
public class DrainBrush extends Brush { public class DrainBrush extends Brush {
private double trueCircle = 0; private double trueCircle = 0;
private boolean disc = false; private boolean disc = false;
@ -18,7 +14,6 @@ public class DrainBrush extends Brush {
this.setName("Drain"); this.setName("Drain");
} }
@SuppressWarnings("deprecation")
private void drain(final SnipeData v) { private void drain(final SnipeData v) {
final int brushSize = v.getBrushSize(); final int brushSize = v.getBrushSize();
final double brushSizeSquared = Math.pow(brushSize + this.trueCircle, 2); final double brushSizeSquared = Math.pow(brushSize + this.trueCircle, 2);

Datei anzeigen

@ -6,9 +6,6 @@ import com.thevoxelbox.voxelsniper.SnipeData;
import com.thevoxelbox.voxelsniper.brush.perform.PerformBrush; import com.thevoxelbox.voxelsniper.brush.perform.PerformBrush;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
/**
* @author psanker
*/
public class EllipseBrush extends PerformBrush { public class EllipseBrush extends PerformBrush {
private static final double TWO_PI = (2 * Math.PI); private static final double TWO_PI = (2 * Math.PI);
private static final int SCL_MIN = 1; private static final int SCL_MIN = 1;
@ -177,7 +174,7 @@ public class EllipseBrush extends PerformBrush {
} }
@Override @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++) { for (int i = 1; i < par.length; i++) {
final String parameter = par[i]; final String parameter = par[i];

Datei anzeigen

@ -72,7 +72,7 @@ public class EllipsoidBrush extends PerformBrush {
} }
@Override @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; this.istrue = false;
for (int i = 1; i < par.length; i++) { for (int i = 1; i < par.length; i++) {
final String parameter = par[i]; final String parameter = par[i];

Datei anzeigen

@ -5,9 +5,7 @@ import com.thevoxelbox.voxelsniper.SnipeData;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.entity.EntityType; import org.bukkit.entity.EntityType;
/**
* @author Piotr
*/
public class EntityBrush extends Brush { public class EntityBrush extends Brush {
private EntityType entityType = EntityType.ZOMBIE; private EntityType entityType = EntityType.ZOMBIE;

Datei anzeigen

@ -10,9 +10,7 @@ import org.bukkit.block.Block;
import java.util.EnumSet; import java.util.EnumSet;
import java.util.Set; import java.util.Set;
/**
* @author Voxel
*/
public class EraserBrush extends Brush { public class EraserBrush extends Brush {
private static final Set<Material> EXCLUSIVE_MATERIALS = EnumSet.of( private static final Set<Material> EXCLUSIVE_MATERIALS = EnumSet.of(

Datei anzeigen

@ -3,7 +3,7 @@ package com.thevoxelbox.voxelsniper.brush;
import com.thevoxelbox.voxelsniper.Message; import com.thevoxelbox.voxelsniper.Message;
import com.thevoxelbox.voxelsniper.SnipeData; import com.thevoxelbox.voxelsniper.SnipeData;
public class ErodeBlendBrush extends Brush{ public class ErodeBlendBrush extends Brush {
private BlendBallBrush blendBall; private BlendBallBrush blendBall;
private ErodeBrush erode; private ErodeBrush erode;

Datei anzeigen

@ -22,10 +22,6 @@ import org.bukkit.util.Vector;
import java.util.*; import java.util.*;
/**
* @author Piotr
* @author MikeMatrix
*/
public class ErodeBrush extends Brush { 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 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); 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) { public static boolean sendHelpOrErrorMessageToPlayer(final JSAPResult result, final Player player, final HelpJSAP helpJSAP) {
final List<String> output = helpJSAP.writeHelpOrErrorMessageIfRequired(result); final List<String> output = helpJSAP.writeHelpOrErrorMessageIfRequired(result);
if (!output.isEmpty()) { if (!output.isEmpty()) {
@ -247,11 +237,12 @@ public class ErodeBrush extends Brush {
return "voxelsniper.brush.erode"; return "voxelsniper.brush.erode";
} }
/**
* @author MikeMatrix
*/
private enum Preset { 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; private ErosionPreset preset;
Preset(final ErosionPreset preset) { Preset(final ErosionPreset preset) {
@ -262,21 +253,20 @@ public class ErodeBrush extends Brush {
* Generates a concat string of all options. * Generates a concat string of all options.
* *
* @param seperator Seperator for delimiting entries. * @param seperator Seperator for delimiting entries.
* @return
*/ */
public static String getValuesString(String seperator) { public static String getValuesString(String seperator) {
String valuesString = ""; StringBuilder valuesString = new StringBuilder();
boolean delimiterHelper = true; boolean delimiterHelper = true;
for (final Preset preset : Preset.values()) { for (final Preset preset : Preset.values()) {
if (delimiterHelper) { if (delimiterHelper) {
delimiterHelper = false; delimiterHelper = false;
} else { } else {
valuesString += seperator; valuesString.append(seperator);
} }
valuesString += preset.name(); valuesString.append(preset.name());
} }
return valuesString; return valuesString.toString();
} }
public ErosionPreset getPreset() { public ErosionPreset getPreset() {
@ -286,9 +276,6 @@ public class ErodeBrush extends Brush {
} }
/**
* @author MikeMatrix
*/
private static final class BlockChangeTracker { private static final class BlockChangeTracker {
private final Map<Integer, Map<Vector, BlockWrapper>> blockChanges; private final Map<Integer, Map<Vector, BlockWrapper>> blockChanges;
private final Map<Vector, BlockWrapper> flatChanges; private final Map<Vector, BlockWrapper> flatChanges;
@ -302,7 +289,7 @@ public class ErodeBrush extends Brush {
} }
public BlockWrapper get(final Vector position, final int iteration) { public BlockWrapper get(final Vector position, final int iteration) {
BlockWrapper changedBlock = null; BlockWrapper changedBlock;
for (int i = iteration - 1; i >= 0; --i) { for (int i = iteration - 1; i >= 0; --i) {
if (this.blockChanges.containsKey(i) && this.blockChanges.get(i).containsKey(position)) { 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 static final class BlockWrapper {
private final AsyncBlock block; private final AsyncBlock block;
private final Material material; private final Material material;
private final int data; private final int data;
@SuppressWarnings("deprecation")
public BlockWrapper(final AsyncBlock block) { public BlockWrapper(final AsyncBlock block) {
this.block = block; this.block = block;
this.data = block.getPropertyId(); this.data = block.getPropertyId();
@ -406,9 +389,6 @@ public class ErodeBrush extends Brush {
} }
/**
* @author MikeMatrix
*/
private static final class ErosionPreset { private static final class ErosionPreset {
private final int erosionFaces; private final int erosionFaces;
private final int erosionRecursion; private final int erosionRecursion;

Datei anzeigen

@ -7,9 +7,6 @@ import org.bukkit.ChatColor;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import org.bukkit.block.BlockFace; import org.bukkit.block.BlockFace;
/**
* @author psanker
*/
public class ExtrudeBrush extends Brush { public class ExtrudeBrush extends Brush {
private double trueCircle; private double trueCircle;
@ -148,7 +145,7 @@ public class ExtrudeBrush extends Brush {
} }
@Override @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++) { for (int i = 1; i < par.length; i++) {
final String parameter = par[i]; final String parameter = par[i];

Datei anzeigen

@ -8,9 +8,7 @@ import com.thevoxelbox.voxelsniper.brush.perform.PerformBrush;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.block.Block; import org.bukkit.block.Block;
/**
* @author Voxel
*/
public class FillDownBrush extends PerformBrush { public class FillDownBrush extends PerformBrush {
private double trueCircle = 0; private double trueCircle = 0;
private boolean fillLiquid = true; private boolean fillLiquid = true;
@ -42,7 +40,9 @@ public class FillDownBrush extends PerformBrush {
break; break;
} }
} }
if (!found) continue; if (!found) {
continue;
}
y--; y--;
} }
for (; y >= -targetBlock.getY(); --y) { for (; y >= -targetBlock.getY(); --y) {

Datei anzeigen

@ -6,9 +6,6 @@ import com.thevoxelbox.voxelsniper.SnipeData;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.Material; import org.bukkit.Material;
/**
* @author GavJenks
*/
public class FlatOceanBrush extends Brush { public class FlatOceanBrush extends Brush {
private static final int DEFAULT_WATER_LEVEL = 29; private static final int DEFAULT_WATER_LEVEL = 29;
private static final int DEFAULT_FLOOR_LEVEL = 8; private static final int DEFAULT_FLOOR_LEVEL = 8;
@ -19,7 +16,6 @@ public class FlatOceanBrush extends Brush {
this.setName("FlatOcean"); this.setName("FlatOcean");
} }
@SuppressWarnings("deprecation")
private void flatOcean(final AsyncChunk chunk) { private void flatOcean(final AsyncChunk chunk) {
for (int x = 0; x < CHUNK_SIZE; x++) { for (int x = 0; x < CHUNK_SIZE; x++) {
for (int z = 0; z < CHUNK_SIZE; z++) { for (int z = 0; z < CHUNK_SIZE; z++) {

Datei anzeigen

@ -14,9 +14,6 @@ import java.util.Random;
// Proposal: Use /v and /vr for leave and wood material // or two more parameters -- Monofraps // Proposal: Use /v and /vr for leave and wood material // or two more parameters -- Monofraps
/**
* @author Ghost8700 @ Voxel
*/
public class GenerateTreeBrush extends Brush { public class GenerateTreeBrush extends Brush {
// Tree Variables. // Tree Variables.
private Random randGenerator = new Random(); private Random randGenerator = new Random();
@ -43,10 +40,7 @@ public class GenerateTreeBrush extends Brush {
private int blockPositionY; private int blockPositionY;
private int blockPositionZ; private int blockPositionZ;
/** public GenerateTreeBrush() {
*
*/
public GenerateTreeBrush() {
this.setName("Generate Tree"); this.setName("Generate Tree");
} }
@ -79,7 +73,6 @@ public class GenerateTreeBrush extends Brush {
} }
// Branch Creation based on direction chosen from the parameters passed. // Branch Creation based on direction chosen from the parameters passed.
@SuppressWarnings("deprecation")
private void branchCreate(final int xDirection, final int zDirection) { private void branchCreate(final int xDirection, final int zDirection) {
// Sets branch origin. // Sets branch origin.
@ -123,7 +116,6 @@ public class GenerateTreeBrush extends Brush {
blockPositionZ = originZ; blockPositionZ = originZ;
} }
@SuppressWarnings("deprecation")
private void leafNodeCreate() { private void leafNodeCreate() {
// Generates the node size. // Generates the node size.
final int nodeRadius = this.randGenerator.nextInt(this.nodeMax - this.nodeMin + 1) + this.nodeMin; 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 xDirection
* @param zDirection * @param zDirection
*/ */
@SuppressWarnings("deprecation")
private void rootCreate(final int xDirection, final int zDirection) { private void rootCreate(final int xDirection, final int zDirection) {
// Sets Origin. // Sets Origin.
final int originX = blockPositionX; final int originX = blockPositionX;
@ -311,7 +302,6 @@ public class GenerateTreeBrush extends Brush {
this.rootCreate(-1, -1); this.rootCreate(-1, -1);
} }
@SuppressWarnings("deprecation")
private void trunkCreate() { private void trunkCreate() {
// Creates true circle discs of the set size using the wood type selected. // Creates true circle discs of the set size using the wood type selected.
final double bSquared = Math.pow(this.thickness + 0.5, 2); final double bSquared = Math.pow(this.thickness + 0.5, 2);

Datei anzeigen

@ -13,25 +13,19 @@ import org.bukkit.util.noise.PerlinNoiseGenerator;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Random; import java.util.Random;
/**
* @author Gavjenks
*/
public class HeatRayBrush extends Brush { public class HeatRayBrush extends Brush {
/** /* private enum FlameableBlock
* @author MikeMatrix {
*/ 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 enum FlameableBlock
// { private Material material;
// 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);
// FlameableBlock(final Material material)
// private Material material; {
// this.material = material;
// FlameableBlock(final Material material) }
// { }*/
// this.material = material;
// }
// }
private static final double REQUIRED_OBSIDIAN_DENSITY = 0.6; private static final double REQUIRED_OBSIDIAN_DENSITY = 0.6;
private static final double REQUIRED_COBBLE_DENSITY = 0.5; private static final double REQUIRED_COBBLE_DENSITY = 0.5;

Datei anzeigen

@ -12,10 +12,6 @@ import org.bukkit.util.Vector;
import java.util.Random; import java.util.Random;
/**
* @author Giltwist
* @author Monofraps
*/
public class JaggedLineBrush extends PerformBrush { public class JaggedLineBrush extends PerformBrush {
private static final Vector HALF_BLOCK_OFFSET = new Vector(0.5, 0.5, 0.5); private static final Vector HALF_BLOCK_OFFSET = new Vector(0.5, 0.5, 0.5);
private static final int RECURSION_MIN = 1; private static final int RECURSION_MIN = 1;

Datei anzeigen

@ -12,10 +12,6 @@ import org.bukkit.event.player.PlayerTeleportEvent;
import java.util.List; import java.util.List;
/**
* @author Voxel
* @author Monofraps
*/
public class JockeyBrush extends Brush { public class JockeyBrush extends Brush {
private static final int ENTITY_STACK_LIMIT = 50; private static final int ENTITY_STACK_LIMIT = 50;
private JockeyType jockeyType = JockeyType.NORMAL_ALL_ENTITIES; private JockeyType jockeyType = JockeyType.NORMAL_ALL_ENTITIES;
@ -138,11 +134,11 @@ public class JockeyBrush extends Brush {
@Override @Override
public final void parameters(final String[] par, final SnipeData v) { public final void parameters(final String[] par, final SnipeData v) {
try {
boolean inverse = false; boolean inverse = false;
boolean playerOnly = false; boolean playerOnly = false;
boolean stack = false; boolean stack = false;
try {
for (String parameter : par) { for (String parameter : par) {
if (parameter.startsWith("-i:")) { if (parameter.startsWith("-i:")) {
inverse = parameter.endsWith("y"); inverse = parameter.endsWith("y");

Datei anzeigen

@ -3,9 +3,6 @@ package com.thevoxelbox.voxelsniper.brush;
import com.thevoxelbox.voxelsniper.Message; import com.thevoxelbox.voxelsniper.Message;
import com.thevoxelbox.voxelsniper.SnipeData; import com.thevoxelbox.voxelsniper.SnipeData;
/**
* @author Gavjenks
*/
public class LightningBrush extends Brush { public class LightningBrush extends Brush {
public LightningBrush() { public LightningBrush() {

Datei anzeigen

@ -10,11 +10,6 @@ import org.bukkit.util.BlockIterator;
import org.bukkit.util.NumberConversions; import org.bukkit.util.NumberConversions;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
/**
* @author Gavjenks
* @author giltwist
* @author MikeMatrix
*/
public class LineBrush extends PerformBrush { public class LineBrush extends PerformBrush {
private static final Vector HALF_BLOCK_OFFSET = new Vector(0.5, 0.5, 0.5); private static final Vector HALF_BLOCK_OFFSET = new Vector(0.5, 0.5, 0.5);
private Vector originCoords = null; private Vector originCoords = null;

Datei anzeigen

@ -9,9 +9,7 @@ import org.bukkit.ChatColor;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.block.Block; import org.bukkit.block.Block;
/**
* @author Voxel
*/
public class OceanBrush extends Brush { 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_DEFAULT = 62; // y=63 -- we are using array indices here
private static final int WATER_LEVEL_MIN = 12; private static final int WATER_LEVEL_MIN = 12;

Datei anzeigen

@ -10,9 +10,6 @@ import com.thevoxelbox.voxelsniper.SnipeData;
import com.thevoxelbox.voxelsniper.brush.perform.PerformBrush; import com.thevoxelbox.voxelsniper.brush.perform.PerformBrush;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
/**
* @author Gavjenks
*/
public class OverlayBrush extends PerformBrush { public class OverlayBrush extends PerformBrush {
private static final int DEFAULT_DEPTH = 3; private static final int DEFAULT_DEPTH = 3;
private int depth = DEFAULT_DEPTH; private int depth = DEFAULT_DEPTH;

Datei anzeigen

@ -6,6 +6,7 @@ import com.thevoxelbox.voxelsniper.SnipeData;
/** /**
* Painting scrolling Brush. * Painting scrolling Brush.
*
* @author Voxel * @author Voxel
*/ */
public class PaintingBrush extends Brush { public class PaintingBrush extends Brush {

Datei anzeigen

@ -8,9 +8,7 @@ import org.bukkit.ChatColor;
import java.util.HashSet; import java.util.HashSet;
/**
* @author Piotr
*/
public class PullBrush extends Brush { public class PullBrush extends Brush {
private final HashSet<BlockWrapper> surface = new HashSet<>(); private final HashSet<BlockWrapper> surface = new HashSet<>();
private int vh; private int vh;
@ -244,9 +242,7 @@ public class PullBrush extends Brush {
return "voxelsniper.brush.pull"; return "voxelsniper.brush.pull";
} }
/**
* @author Piotr
*/
private final class BlockWrapper { private final class BlockWrapper {
private final int id; private final int id;

Datei anzeigen

@ -19,11 +19,6 @@ import org.bukkit.util.Vector;
import java.util.List; import java.util.List;
import java.util.Random; import java.util.Random;
/**
* @author Monofraps
* @author Deamon
* @author MikeMatrix
*/
public class PunishBrush extends PerformBrush { public class PunishBrush extends PerformBrush {
private static final int MAXIMAL_RANDOM_TELEPORTATION_RANGE = 400; private static final int MAXIMAL_RANDOM_TELEPORTATION_RANGE = 400;
private static final int TICKS_PER_SECOND = 20; private static final int TICKS_PER_SECOND = 20;
@ -313,9 +308,6 @@ public class PunishBrush extends PerformBrush {
return "voxelsniper.brush.punish"; return "voxelsniper.brush.punish";
} }
/**
* @author Monofraps
*/
private enum Punishment { private enum Punishment {
// Monofraps // Monofraps
FIRE, LIGHTNING, BLINDNESS, DRUNK, KILL, RANDOMTP, ALL_POTION, FIRE, LIGHTNING, BLINDNESS, DRUNK, KILL, RANDOMTP, ALL_POTION,

Datei anzeigen

@ -8,10 +8,6 @@ import com.thevoxelbox.voxelsniper.Undo;
import java.util.Random; import java.util.Random;
/**
* @author Piotr
* @author Giltwist (Randomized blockPositionY)
*/
public class RandomErodeBrush extends Brush { public class RandomErodeBrush extends Brush {
private final double trueCircle = 0.5; private final double trueCircle = 0.5;
private BlockWrapper[][][] snap; private BlockWrapper[][][] snap;
@ -19,7 +15,6 @@ public class RandomErodeBrush extends Brush {
private int bsize; private int bsize;
private int erodeFace; private int erodeFace;
private int fillFace; private int fillFace;
private int brushSize;
private int erodeRecursion = 1; private int erodeRecursion = 1;
private int fillRecursion = 1; private int fillRecursion = 1;
private Random generator = new Random(); 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) { private boolean fill(final int x, final int y, final int z) {
if (this.snap[x][y][z].isSolid()) { if (this.snap[x][y][z].isSolid()) {
return false; return false;
@ -90,19 +84,17 @@ public class RandomErodeBrush extends Brush {
} }
private void getMatrix() { private void getMatrix() {
this.brushSize = ((this.bsize + 1) * 2) + 1; int brushSize = ((this.bsize + 1) * 2) + 1;
if (this.snap.length == 0) { 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 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++) { 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++) { 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++) { for (int y = 0; y < this.snap.length; y++) {
this.snap[x][y][z] = new BlockWrapper(this.clampY(sx, sy, sz)); this.snap[x][y][z] = new BlockWrapper(this.clampY(sx, sy, sz));
sy++; sy++;
@ -113,16 +105,14 @@ public class RandomErodeBrush extends Brush {
} }
this.firstSnap = this.snap.clone(); this.firstSnap = this.snap.clone();
} else { } 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 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++) { 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++) { 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++) { for (int y = 0; y < this.snap.length; y++) {
this.snap[x][y][z] = new BlockWrapper(this.clampY(sx, sy, sz)); this.snap[x][y][z] = new BlockWrapper(this.clampY(sx, sy, sz));
sy++; sy++;
@ -312,29 +302,18 @@ public class RandomErodeBrush extends Brush {
return "voxelsniper.brush.randomerode"; return "voxelsniper.brush.randomerode";
} }
/**
* @author unknown
*/
private class BlockWrapper { private class BlockWrapper {
private boolean solid; private boolean solid;
private AsyncBlock nativeBlock; private AsyncBlock nativeBlock;
private int id; private int id;
private int i; private int i;
/**
* @param bl
*/
@SuppressWarnings("deprecation")
public BlockWrapper(final AsyncBlock bl) { public BlockWrapper(final AsyncBlock bl) {
this.setNativeBlock(bl); this.setNativeBlock(bl);
this.setI(bl.getTypeId()); this.setI(bl.getTypeId());
switch (bl.getType()) { switch (bl.getType()) {
case AIR: case AIR:
this.setSolid(false);
break;
case WATER: case WATER:
this.setSolid(false);
break;
case LAVA: case LAVA:
this.setSolid(false); this.setSolid(false);
break; break;

Datei anzeigen

@ -6,9 +6,7 @@ import com.thevoxelbox.voxelsniper.SnipeData;
import com.thevoxelbox.voxelsniper.brush.perform.PerformBrush; import com.thevoxelbox.voxelsniper.brush.perform.PerformBrush;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
/**
* @author Voxel
*/
public class RingBrush extends PerformBrush { public class RingBrush extends PerformBrush {
private double trueCircle = 0; private double trueCircle = 0;
private double innerSize = 0; private double innerSize = 0;

Datei anzeigen

@ -7,9 +7,7 @@ import com.thevoxelbox.voxelsniper.SnipeData;
import com.thevoxelbox.voxelsniper.util.BlockWrapper; import com.thevoxelbox.voxelsniper.util.BlockWrapper;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
/**
* @author Piotr
*/
public class Rot2DBrush extends Brush { public class Rot2DBrush extends Brush {
private int mode = 0; private int mode = 0;
private int bSize; private int bSize;

Datei anzeigen

@ -8,15 +8,11 @@ import com.thevoxelbox.voxelsniper.util.BlockWrapper;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.ChatColor; 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 // 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. // 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 { public class Rot2DvertBrush extends Brush {
private int mode = 0; private int mode = 0;
private int bSize; private int bSize;
private int brushSize;
private BlockWrapper[][][] snap; private BlockWrapper[][][] snap;
private double se; private double se;
@ -26,19 +22,17 @@ public class Rot2DvertBrush extends Brush {
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
private void getMatrix() { 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 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++) { 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++) { 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++) { 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? 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 brushSizeSquared = Math.pow(this.bSize + 0.5, 2);
final double cos = Math.cos(this.se); final double cos = Math.cos(this.se);
final double sin = Math.sin(this.se); final double sin = Math.sin(this.se);
@ -139,7 +133,7 @@ public class Rot2DvertBrush extends Brush {
if (this.mode == 0) { if (this.mode == 0) {
this.getMatrix(); this.getMatrix();
this.rotate(v); this.rotate();
} else { } else {
v.owner().getPlayer().sendMessage(ChatColor.RED + "Something went wrong."); v.owner().getPlayer().sendMessage(ChatColor.RED + "Something went wrong.");
} }
@ -151,7 +145,7 @@ public class Rot2DvertBrush extends Brush {
if (this.mode == 0) { if (this.mode == 0) {
this.getMatrix(); this.getMatrix();
this.rotate(v); this.rotate();
} else { } else {
v.owner().getPlayer().sendMessage(ChatColor.RED + "Something went wrong."); v.owner().getPlayer().sendMessage(ChatColor.RED + "Something went wrong.");
} }

Datei anzeigen

@ -6,9 +6,6 @@ import com.thevoxelbox.voxelsniper.Undo;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
/**
* @author Gavjenks
*/
public class RulerBrush extends Brush { public class RulerBrush extends Brush {
private boolean first = true; private boolean first = true;
private Vector coords = new Vector(0, 0, 0); private Vector coords = new Vector(0, 0, 0);

Datei anzeigen

@ -8,9 +8,6 @@ import org.bukkit.ChatColor;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.block.BlockFace; import org.bukkit.block.BlockFace;
/**
* @author DivineRage
*/
public class ScannerBrush extends Brush { public class ScannerBrush extends Brush {
private static final int DEPTH_MIN = 1; private static final int DEPTH_MIN = 1;
private static final int DEPTH_DEFAULT = 24; private static final int DEPTH_DEFAULT = 24;

Datei anzeigen

@ -6,9 +6,7 @@ import com.thevoxelbox.voxelsniper.brush.perform.PerformBrush;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.block.Block; import org.bukkit.block.Block;
/**
* @author Voxel
*/
public class SetBrush extends PerformBrush { public class SetBrush extends PerformBrush {
private static final int SELECTION_SIZE_MAX = 5000000; private static final int SELECTION_SIZE_MAX = 5000000;
private Block block = null; private Block block = null;

Datei anzeigen

@ -8,9 +8,7 @@ import org.bukkit.ChatColor;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.block.Block; import org.bukkit.block.Block;
/**
* @author Voxel
*/
public class SetRedstoneFlipBrush extends Brush { public class SetRedstoneFlipBrush extends Brush {
private Block block = null; private Block block = null;
private Undo undo; private Undo undo;

Datei anzeigen

@ -8,9 +8,7 @@ import org.bukkit.ChatColor;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.block.Block; import org.bukkit.block.Block;
/**
* @author Voxel
*/
public class SetRedstoneRotateBrush extends Brush { public class SetRedstoneRotateBrush extends Brush {
private Block block = null; private Block block = null;
private Undo undo; private Undo undo;

Datei anzeigen

@ -8,6 +8,7 @@ import org.bukkit.block.Block;
/** /**
* THIS BRUSH SHOULD NOT USE PERFORMERS. * THIS BRUSH SHOULD NOT USE PERFORMERS.
*
* @author Voxel * @author Voxel
*/ */
public class ShellBallBrush extends Brush { public class ShellBallBrush extends Brush {

Datei anzeigen

@ -9,9 +9,7 @@ import org.bukkit.block.Block;
import java.util.ArrayList; import java.util.ArrayList;
/**
* @author Piotr
*/
public class ShellSetBrush extends Brush { public class ShellSetBrush extends Brush {
private static final int MAX_SIZE = 5000000; private static final int MAX_SIZE = 5000000;
private Block block = null; private Block block = null;

Datei anzeigen

@ -8,6 +8,7 @@ import org.bukkit.block.Block;
/** /**
* THIS BRUSH SHOULD NOT USE PERFORMERS. * THIS BRUSH SHOULD NOT USE PERFORMERS.
*
* @author Voxel * @author Voxel
*/ */
public class ShellVoxelBrush extends Brush { public class ShellVoxelBrush extends Brush {

Datei anzeigen

@ -12,6 +12,7 @@ import java.util.Arrays;
/** /**
* Overwrites signs. * Overwrites signs.
*
* @author Monofraps * @author Monofraps
*/ */
public class SignOverwriteBrush extends Brush { public class SignOverwriteBrush extends Brush {

Datei anzeigen

@ -4,9 +4,7 @@ import com.thevoxelbox.voxelsniper.Message;
import com.thevoxelbox.voxelsniper.SnipeData; import com.thevoxelbox.voxelsniper.SnipeData;
import com.thevoxelbox.voxelsniper.brush.perform.PerformBrush; import com.thevoxelbox.voxelsniper.brush.perform.PerformBrush;
/**
* @author Voxel
*/
public class SnipeBrush extends PerformBrush { public class SnipeBrush extends PerformBrush {
public SnipeBrush() { public SnipeBrush() {

Datei anzeigen

@ -12,9 +12,7 @@ import org.bukkit.Material;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import org.bukkit.block.BlockFace; import org.bukkit.block.BlockFace;
/**
* @author Voxel
*/
public class SnowConeBrush extends Brush { public class SnowConeBrush extends Brush {
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
private void addSnow(final SnipeData v, Block targetBlock) { private void addSnow(final SnipeData v, Block targetBlock) {

Datei anzeigen

@ -1,7 +1,6 @@
package com.thevoxelbox.voxelsniper.brush; package com.thevoxelbox.voxelsniper.brush;
import com.sk89q.worldedit.extension.input.InputParseException; import com.sk89q.worldedit.extension.input.InputParseException;
import com.sk89q.worldedit.world.block.BlockType;
import com.sk89q.worldedit.world.block.BlockTypes; import com.sk89q.worldedit.world.block.BlockTypes;
import com.thevoxelbox.voxelsniper.Message; import com.thevoxelbox.voxelsniper.Message;
import com.thevoxelbox.voxelsniper.SnipeData; import com.thevoxelbox.voxelsniper.SnipeData;
@ -9,9 +8,6 @@ import com.thevoxelbox.voxelsniper.Undo;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.block.Block; import org.bukkit.block.Block;
/**
* @author giltwist
*/
public class SpiralStaircaseBrush extends Brush { 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 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 private String sdirect = "c"; // "c" clockwise (default), "cc" counter-clockwise
@ -21,7 +17,6 @@ public class SpiralStaircaseBrush extends Brush {
this.setName("Spiral Staircase"); this.setName("Spiral Staircase");
} }
@SuppressWarnings("deprecation")
private void buildStairWell(final SnipeData v, Block targetBlock) { private void buildStairWell(final SnipeData v, Block targetBlock) {
if (v.getVoxelHeight() < 1) { if (v.getVoxelHeight() < 1) {
v.setVoxelHeight(1); v.setVoxelHeight(1);
@ -32,12 +27,9 @@ public class SpiralStaircaseBrush extends Brush {
// locate first block in staircase // locate first block in staircase
// Note to self, fix these // Note to self, fix these
int startX = 0; int startX;
int startZ = 0; int startZ;
int y = 0; int y = 0;
int xOffset = 0;
int zOffset = 0;
int toggle = 0;
if (this.sdirect.equalsIgnoreCase("cc")) { if (this.sdirect.equalsIgnoreCase("cc")) {
if (this.sopen.equalsIgnoreCase("n")) { 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()) { while (y < v.getVoxelHeight()) {
if (this.stairtype.equalsIgnoreCase("block")) { if (this.stairtype.equalsIgnoreCase("block")) {
// 1x1x1 voxel material steps // 1x1x1 voxel material steps
@ -218,9 +213,6 @@ public class SpiralStaircaseBrush extends Brush {
break; break;
case 1: case 1:
switch (stairtype) {
}
if (this.stairtype.equalsIgnoreCase("block")) { if (this.stairtype.equalsIgnoreCase("block")) {
this.setBlockIdAt(blockPositionZ - v.getBrushSize() + z, blockPositionX - v.getBrushSize() + x, blockPositionY + i, v.getVoxelId()); this.setBlockIdAt(blockPositionZ - v.getBrushSize() + z, blockPositionX - v.getBrushSize() + x, blockPositionY + i, v.getVoxelId());
} else if (this.stairtype.equalsIgnoreCase("step")) { } else if (this.stairtype.equalsIgnoreCase("step")) {
@ -253,7 +245,6 @@ public class SpiralStaircaseBrush extends Brush {
v.owner().storeUndo(undo); v.owner().storeUndo(undo);
} }
@SuppressWarnings("deprecation")
private void digStairWell(final SnipeData v, Block targetBlock) { private void digStairWell(final SnipeData v, Block targetBlock) {
if (v.getVoxelHeight() < 1) { if (v.getVoxelHeight() < 1) {
v.setVoxelHeight(1); v.setVoxelHeight(1);
@ -265,12 +256,8 @@ public class SpiralStaircaseBrush extends Brush {
// locate first block in staircase // locate first block in staircase
// Note to self, fix these // Note to self, fix these
int startX = 0; int startX;
int startZ = 0; int startZ;
int y = 0;
int xOffset = 0;
int zOffset = 0;
int toggle = 0;
if (this.sdirect.equalsIgnoreCase("cc")) { if (this.sdirect.equalsIgnoreCase("cc")) {
if (this.sopen.equalsIgnoreCase("n")) { 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()) { while (y < v.getVoxelHeight()) {
if (this.stairtype.equalsIgnoreCase("block")) { if (this.stairtype.equalsIgnoreCase("block")) {
// 1x1x1 voxel material steps // 1x1x1 voxel material steps
@ -517,14 +508,11 @@ public class SpiralStaircaseBrush extends Brush {
// step/slab // step/slab
try { try {
BlockType type = BlockTypes.parse(par[i]);
this.stairtype = par[i].toLowerCase().intern(); this.stairtype = par[i].toLowerCase().intern();
v.sendMessage(ChatColor.BLUE + "Staircase type: " + this.stairtype); v.sendMessage(ChatColor.BLUE + "Staircase type: " + this.stairtype);
return; return;
} catch (InputParseException ignore) { } 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")) { if (par[i].equalsIgnoreCase("block") || par[i].equalsIgnoreCase("step") || par[i].equalsIgnoreCase("woodstair") || par[i].equalsIgnoreCase("cobblestair")) {
this.stairtype = par[i].toLowerCase().intern(); this.stairtype = par[i].toLowerCase().intern();
v.sendMessage(ChatColor.BLUE + "Staircase type: " + this.stairtype); v.sendMessage(ChatColor.BLUE + "Staircase type: " + this.stairtype);

Datei anzeigen

@ -8,9 +8,7 @@ import org.bukkit.ChatColor;
import java.util.Random; import java.util.Random;
/**
* @author Voxel
*/
public class SplatterBallBrush extends PerformBrush { public class SplatterBallBrush extends PerformBrush {
private static final int GROW_PERCENT_MIN = 1; private static final int GROW_PERCENT_MIN = 1;
private static final int GROW_PERCENT_DEFAULT = 1000; private static final int GROW_PERCENT_DEFAULT = 1000;
@ -100,12 +98,13 @@ public class SplatterBallBrush extends PerformBrush {
// integrate tempsplat back into splat at end of iteration // integrate tempsplat back into splat at end of iteration
for (int x = 2 * v.getBrushSize(); x >= 0; x--) { for (int x = 2 * v.getBrushSize(); x >= 0; x--) {
for (int y = 2 * v.getBrushSize(); y >= 0; y--) { 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, System.arraycopy(tempSplat[x][y], 0, splat[x][y], 0,
2 * v.getBrushSize() + 1); 2 * v.getBrushSize() + 1);
} }
} }
} }
}
this.growPercent = gref; this.growPercent = gref;
// Fill 1x1x1 holes // Fill 1x1x1 holes
for (int x = 2 * v.getBrushSize(); x >= 0; x--) { for (int x = 2 * v.getBrushSize(); x >= 0; x--) {

Datei anzeigen

@ -8,9 +8,7 @@ import org.bukkit.ChatColor;
import java.util.Random; import java.util.Random;
/**
* @author Voxel
*/
public class SplatterDiscBrush extends PerformBrush { public class SplatterDiscBrush extends PerformBrush {
private static final int GROW_PERCENT_MIN = 1; private static final int GROW_PERCENT_MIN = 1;
private static final int GROW_PERCENT_DEFAULT = 1000; private static final int GROW_PERCENT_DEFAULT = 1000;
@ -90,10 +88,11 @@ public class SplatterDiscBrush extends PerformBrush {
// integrate tempsplat back into splat at end of iteration // integrate tempsplat back into splat at end of iteration
for (int x = 2 * v.getBrushSize(); x >= 0; x--) { 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); System.arraycopy(tempSplat[x], 0, splat[x], 0, 2 * v.getBrushSize() + 1);
} }
} }
}
this.growPercent = gref; this.growPercent = gref;
// Fill 1x1 holes // Fill 1x1 holes
for (int x = 2 * v.getBrushSize(); x >= 0; x--) { for (int x = 2 * v.getBrushSize(); x >= 0; x--) {

Datei anzeigen

@ -10,9 +10,6 @@ import org.bukkit.ChatColor;
import java.util.Random; import java.util.Random;
/**
* @author Gavjenks Splatterized blockPositionY Giltwist
*/
public class SplatterOverlayBrush extends PerformBrush { public class SplatterOverlayBrush extends PerformBrush {
private static final int GROW_PERCENT_MIN = 1; private static final int GROW_PERCENT_MIN = 1;
private static final int GROW_PERCENT_DEFAULT = 1000; private static final int GROW_PERCENT_DEFAULT = 1000;
@ -83,10 +80,11 @@ public class SplatterOverlayBrush extends PerformBrush {
} }
// integrate tempsplat back into splat at end of iteration // integrate tempsplat back into splat at end of iteration
for (int x = 2 * v.getBrushSize(); x >= 0; x--) { 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); System.arraycopy(tempSplat[x], 0, splat[x], 0, 2 * v.getBrushSize() + 1);
} }
} }
}
this.growPercent = gref; this.growPercent = gref;
final int[][] memory = new int[2 * v.getBrushSize() + 1][2 * v.getBrushSize() + 1]; final int[][] memory = new int[2 * v.getBrushSize() + 1][2 * v.getBrushSize() + 1];
@ -119,9 +117,6 @@ public class SplatterOverlayBrush extends PerformBrush {
memory[x + v.getBrushSize()][z + v.getBrushSize()] = 1; memory[x + v.getBrushSize()][z + v.getBrushSize()] = 1;
} }
} }
continue;
} else {
continue;
} }
} else { } else {
final int depth = randomizeHeight ? generator.nextInt(this.depth) : this.depth; final int depth = randomizeHeight ? generator.nextInt(this.depth) : this.depth;
@ -192,10 +187,11 @@ public class SplatterOverlayBrush extends PerformBrush {
} }
// integrate tempsplat back into splat at end of iteration // integrate tempsplat back into splat at end of iteration
for (int x = 2 * v.getBrushSize(); x >= 0; x--) { 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); System.arraycopy(tempsplat[x], 0, splat[x], 0, 2 * v.getBrushSize() + 1);
} }
} }
}
this.growPercent = gref; this.growPercent = gref;
final int[][] memory = new int[v.getBrushSize() * 2 + 1][v.getBrushSize() * 2 + 1]; final int[][] memory = new int[v.getBrushSize() * 2 + 1][v.getBrushSize() * 2 + 1];
@ -220,9 +216,6 @@ public class SplatterOverlayBrush extends PerformBrush {
// in parameters // in parameters
memory[x + v.getBrushSize()][z + v.getBrushSize()] = 1; // stop it from checking any other blocks in this vertical 1x1 column. memory[x + v.getBrushSize()][z + v.getBrushSize()] = 1; // stop it from checking any other blocks in this vertical 1x1 column.
} }
continue;
} else {
continue;
} }
} else { } else {
final int depth = randomizeHeight ? generator.nextInt(this.depth) : this.depth; final int depth = randomizeHeight ? generator.nextInt(this.depth) : this.depth;

Datei anzeigen

@ -8,9 +8,7 @@ import org.bukkit.ChatColor;
import java.util.Random; import java.util.Random;
/**
* @author Voxel
*/
public class SplatterVoxelBrush extends PerformBrush { public class SplatterVoxelBrush extends PerformBrush {
private static final int GROW_PERCENT_MIN = 1; private static final int GROW_PERCENT_MIN = 1;
private static final int GROW_PERCENT_DEFAULT = 1000; private static final int GROW_PERCENT_DEFAULT = 1000;
@ -100,12 +98,13 @@ public class SplatterVoxelBrush extends PerformBrush {
// integrate tempsplat back into splat at end of iteration // integrate tempsplat back into splat at end of iteration
for (int x = 2 * v.getBrushSize(); x >= 0; x--) { for (int x = 2 * v.getBrushSize(); x >= 0; x--) {
for (int y = 2 * v.getBrushSize(); y >= 0; y--) { 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, System.arraycopy(tempSplat[x][y], 0, splat[x][y], 0,
2 * v.getBrushSize() + 1); 2 * v.getBrushSize() + 1);
} }
} }
} }
}
this.growPercent = gref; this.growPercent = gref;
// Fill 1x1x1 holes // Fill 1x1x1 holes
for (int x = 2 * v.getBrushSize(); x >= 0; x--) { for (int x = 2 * v.getBrushSize(); x >= 0; x--) {

Datei anzeigen

@ -8,9 +8,7 @@ import org.bukkit.block.Block;
import java.util.Random; import java.util.Random;
/**
* @author Voxel
*/
public class SplatterVoxelDiscBrush extends PerformBrush { public class SplatterVoxelDiscBrush extends PerformBrush {
private static final int GROW_PERCENT_MIN = 1; private static final int GROW_PERCENT_MIN = 1;
private static final int GROW_PERCENT_DEFAULT = 1000; private static final int GROW_PERCENT_DEFAULT = 1000;
@ -87,10 +85,11 @@ public class SplatterVoxelDiscBrush extends PerformBrush {
} }
// integrate tempsplat back into splat at end of iteration // integrate tempsplat back into splat at end of iteration
for (int x = 2 * v.getBrushSize(); x >= 0; x--) { 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); System.arraycopy(tempSplat[x], 0, splat[x], 0, 2 * v.getBrushSize() + 1);
} }
} }
}
this.growPercent = gref; this.growPercent = gref;
// Fill 1x1 holes // Fill 1x1 holes
for (int x = 2 * v.getBrushSize(); x >= 0; x--) { for (int x = 2 * v.getBrushSize(); x >= 0; x--) {

Datei anzeigen

@ -146,7 +146,7 @@ public class SplineBrush extends PerformBrush {
} }
@Override @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++) { for (int i = 1; i < par.length; i++) {
if (par[i].equalsIgnoreCase("info")) { if (par[i].equalsIgnoreCase("info")) {
v.sendMessage(ChatColor.GOLD + "Spline brush parameters"); v.sendMessage(ChatColor.GOLD + "Spline brush parameters");

Datei anzeigen

@ -27,25 +27,14 @@ public class StampBrush extends Brush {
this.sorted = false; this.sorted = false;
} }
/**
* @param id
* @return
*/
protected final boolean falling(final int id) { protected final boolean falling(final int id) {
return (id > 7 && id < 14); return (id > 7 && id < 14);
} }
/**
* @param id
* @return
*/
protected final boolean fallsOff(final int id) { protected final boolean fallsOff(final int id) {
return (BlockTypes.get(id).getMaterial().isFragileWhenPushed()); return (BlockTypes.get(id).getMaterial().isFragileWhenPushed());
} }
/**
* @param cb
*/
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
protected final void setBlock(final BlockWrapper cb) { 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); 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); block.setPropertyId(cb.d);
} }
/**
* @param cb
*/
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
protected final void setBlockFill(final BlockWrapper cb) { 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); 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) { protected final void setStamp(final StampType type) {
this.stamp = type; this.stamp = type;
} }
/**
* @param v
*/
protected final void stamp(final SnipeData v) { protected final void stamp(final SnipeData v) {
this.undo = new Undo(); this.undo = new Undo();
@ -116,9 +96,6 @@ public class StampBrush extends Brush {
v.owner().storeUndo(this.undo); v.owner().storeUndo(this.undo);
} }
/**
* @param v
*/
protected final void stampFill(final SnipeData v) { protected final void stampFill(final SnipeData v) {
this.undo = new Undo(); this.undo = new Undo();
@ -159,9 +136,6 @@ public class StampBrush extends Brush {
v.owner().storeUndo(this.undo); v.owner().storeUndo(this.undo);
} }
/**
* @param v
*/
protected final void stampNoAir(final SnipeData v) { protected final void stampNoAir(final SnipeData v) {
this.undo = new Undo(); this.undo = new Undo();
@ -238,16 +212,11 @@ public class StampBrush extends Brush {
return "voxelsniper.brush.stamp"; return "voxelsniper.brush.stamp";
} }
/**
* @author Monofraps
*/
protected enum StampType { protected enum StampType {
NO_AIR, FILL, DEFAULT NO_AIR, FILL, DEFAULT
} }
/**
* @author Voxel
*/
protected class BlockWrapper { protected class BlockWrapper {
public int id; public int id;
public int x; public int x;
@ -255,13 +224,6 @@ public class StampBrush extends Brush {
public int z; public int z;
public int d; 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) { public BlockWrapper(final AsyncBlock b, final int blx, final int bly, final int blz) {
this.id = b.getTypeId(); this.id = b.getTypeId();
this.d = b.getPropertyId(); this.d = b.getPropertyId();

Datei anzeigen

@ -42,10 +42,7 @@ public class StencilBrush extends Brush {
private int[] pastePoint = new int[3]; private int[] pastePoint = new int[3];
private byte point = 1; private byte point = 1;
/** public StencilBrush() {
*
*/
public StencilBrush() {
this.setName("Stencil"); this.setName("Stencil");
} }
@ -60,8 +57,7 @@ public class StencilBrush extends Brush {
final File file = new File("plugins/VoxelSniper/stencils/" + this.filename + ".vstencil"); final File file = new File("plugins/VoxelSniper/stencils/" + this.filename + ".vstencil");
if (file.exists()) { if (file.exists()) {
try { try (final FaweInputStream in = new FaweInputStream(new DataInputStream(new GZIPInputStream(new BufferedInputStream(new FileInputStream(file)))))) {
final FaweInputStream in = new FaweInputStream(new DataInputStream(new GZIPInputStream(new BufferedInputStream(new FileInputStream(file)))));
this.x = in.readShort(); this.x = in.readShort();
this.z = in.readShort(); this.z = in.readShort();
@ -222,7 +218,7 @@ public class StencilBrush extends Brush {
Files.createParentDirs(file); Files.createParentDirs(file);
file.createNewFile(); file.createNewFile();
final FaweOutputStream out = new FaweOutputStream(new DataOutputStream(new PGZIPOutputStream(new BufferedOutputStream(new FileOutputStream(file))))); 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 blockPositionX = Math.min(this.firstPoint[0], this.secondPoint[0]);
int blockPositionZ = Math.min(this.firstPoint[1], this.secondPoint[1]); int blockPositionZ = Math.min(this.firstPoint[1], this.secondPoint[1]);
int blockPositionY = Math.min(this.firstPoint[2], this.secondPoint[2]); int blockPositionY = Math.min(this.firstPoint[2], this.secondPoint[2]);
@ -277,7 +273,7 @@ public class StencilBrush extends Brush {
} }
v.sendMessage(ChatColor.BLUE + "Saved as '" + this.filename + "'."); v.sendMessage(ChatColor.BLUE + "Saved as '" + this.filename + "'.");
out.close(); }
} catch (final Exception exception) { } catch (final Exception exception) {
v.sendMessage(ChatColor.RED + "Something went wrong."); v.sendMessage(ChatColor.RED + "Something went wrong.");

Datei anzeigen

@ -12,9 +12,6 @@ import java.io.FileInputStream;
import java.util.HashMap; import java.util.HashMap;
import java.util.Scanner; import java.util.Scanner;
/**
* @author Gavjenks
*/
public class StencilListBrush extends Brush { public class StencilListBrush extends Brush {
private byte pasteOption = 1; // 0 = full, 1 = fill, 2 = replace private byte pasteOption = 1; // 0 = full, 1 = fill, 2 = replace
private String filename = "NoFileLoaded"; private String filename = "NoFileLoaded";
@ -31,13 +28,13 @@ public class StencilListBrush extends Brush {
this.setName("StencilList"); this.setName("StencilList");
} }
private String readRandomStencil(final SnipeData v) { private String readRandomStencil() {
double rand = Math.random() * (this.stencilList.size()); double rand = Math.random() * (this.stencilList.size());
final int choice = (int) rand; final int choice = (int) rand;
return this.stencilList.get(choice); 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"); final File file = new File("plugins/VoxelSniper/stencilLists/" + this.filename + ".txt");
if (file.exists()) { if (file.exists()) {
try { try {
@ -61,16 +58,14 @@ public class StencilListBrush extends Brush {
return; return;
} }
final String stencilName = this.readRandomStencil(v); final String stencilName = this.readRandomStencil();
v.sendMessage(stencilName); v.sendMessage(stencilName);
final Undo undo = new Undo(); final Undo undo = new Undo();
final File file = new File("plugins/VoxelSniper/stencils/" + stencilName + ".vstencil"); final File file = new File("plugins/VoxelSniper/stencils/" + stencilName + ".vstencil");
if (file.exists()) { if (file.exists()) {
try { try (final DataInputStream in = new DataInputStream(new BufferedInputStream(new FileInputStream(file)))){
final DataInputStream in = new DataInputStream(new BufferedInputStream(new FileInputStream(file)));
this.x = in.readShort(); this.x = in.readShort();
this.z = in.readShort(); this.z = in.readShort();
this.y = in.readShort(); this.y = in.readShort();
@ -221,14 +216,13 @@ public class StencilListBrush extends Brush {
return; return;
} }
final String stencilName = this.readRandomStencil(v); final String stencilName = this.readRandomStencil();
final Undo undo = new Undo(); final Undo undo = new Undo();
final File file = new File("plugins/VoxelSniper/stencils/" + stencilName + ".vstencil"); final File file = new File("plugins/VoxelSniper/stencils/" + stencilName + ".vstencil");
if (file.exists()) { if (file.exists()) {
try { try (final DataInputStream in = new DataInputStream(new BufferedInputStream(new FileInputStream(file)))) {
final DataInputStream in = new DataInputStream(new BufferedInputStream(new FileInputStream(file)));
this.x = in.readShort(); this.x = in.readShort();
this.z = in.readShort(); this.z = in.readShort();
@ -380,14 +374,13 @@ public class StencilListBrush extends Brush {
return; return;
} }
final String stencilName = this.readRandomStencil(v); final String stencilName = this.readRandomStencil();
final Undo undo = new Undo(); final Undo undo = new Undo();
final File file = new File("plugins/VoxelSniper/stencils/" + stencilName + ".vstencil"); final File file = new File("plugins/VoxelSniper/stencils/" + stencilName + ".vstencil");
if (file.exists()) { if (file.exists()) {
try { try (final DataInputStream in = new DataInputStream(new BufferedInputStream(new FileInputStream(file)))) {
final DataInputStream in = new DataInputStream(new BufferedInputStream(new FileInputStream(file)));
this.x = in.readShort(); this.x = in.readShort();
this.z = in.readShort(); this.z = in.readShort();
@ -547,7 +540,7 @@ public class StencilListBrush extends Brush {
return; return;
} }
final String stencilName = this.readRandomStencil(v); final String stencilName = this.readRandomStencil();
final Undo undo = new Undo(); final Undo undo = new Undo();
final File file = new File("plugins/VoxelSniper/stencils/" + stencilName + ".vstencil"); 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) { private void stencilPasteRotation(final SnipeData v) {
// just randomly chooses a rotation and then calls stencilPaste. // just randomly chooses a rotation and then calls stencilPaste.
this.readStencilList(this.filename, v); this.readStencilList();
final double random = Math.random(); final double random = Math.random();
if (random < 0.26) { if (random < 0.26) {
this.stencilPaste(v); this.stencilPaste(v);
@ -753,7 +746,7 @@ public class StencilListBrush extends Brush {
final File file = new File("plugins/VoxelSniper/stencilLists/" + this.filename + ".txt"); final File file = new File("plugins/VoxelSniper/stencilLists/" + this.filename + ".txt");
if (file.exists()) { if (file.exists()) {
v.sendMessage(ChatColor.RED + "Stencil List '" + this.filename + "' exists and was loaded."); v.sendMessage(ChatColor.RED + "Stencil List '" + this.filename + "' exists and was loaded.");
this.readStencilList(this.filename, v); this.readStencilList();
} else { } else {
v.sendMessage(ChatColor.AQUA + "Stencil List '" + this.filename + "' does not exist. This brush will not function without a valid stencil list."); v.sendMessage(ChatColor.AQUA + "Stencil List '" + this.filename + "' does not exist. This brush will not function without a valid stencil list.");
this.filename = "NoFileLoaded"; this.filename = "NoFileLoaded";

Datei anzeigen

@ -7,9 +7,6 @@ import org.bukkit.ChatColor;
import org.bukkit.util.NumberConversions; import org.bukkit.util.NumberConversions;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
/**
* @author Giltwist
*/
public class ThreePointCircleBrush extends PerformBrush { public class ThreePointCircleBrush extends PerformBrush {
private Vector coordsOne; private Vector coordsOne;
private Vector coordsTwo; private Vector coordsTwo;
@ -157,12 +154,12 @@ public class ThreePointCircleBrush extends PerformBrush {
public final void parameters(final String[] par, final SnipeData v) { public final void parameters(final String[] par, final SnipeData v) {
if (par[1].equalsIgnoreCase("info")) { 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."); 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()) { for (final Tolerance tolerance : Tolerance.values()) {
if (!toleranceOptions.isEmpty()) { if (toleranceOptions.length() > 0) {
toleranceOptions += "|"; 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"); v.sendMessage(ChatColor.GOLD + "/b tpc " + toleranceOptions + " -- Toggle the calculations to emphasize accuracy or smoothness");
return; return;
@ -191,7 +188,9 @@ public class ThreePointCircleBrush extends PerformBrush {
* @author MikeMatrix * @author MikeMatrix
*/ */
private enum Tolerance { private enum Tolerance {
DEFAULT(1000), ACCURATE(10), SMOOTH(2000); DEFAULT(1000),
ACCURATE(10),
SMOOTH(2000);
private int value; private int value;
Tolerance(final int value) { Tolerance(final int value) {

Datei anzeigen

@ -12,10 +12,6 @@ import org.bukkit.Material;
import org.bukkit.TreeType; import org.bukkit.TreeType;
import org.bukkit.block.BlockFace; import org.bukkit.block.BlockFace;
/**
* @author Mick
*/
public class TreeSnipeBrush extends Brush { public class TreeSnipeBrush extends Brush {
private TreeType treeType = TreeType.TREE; private TreeType treeType = TreeType.TREE;

Datei anzeigen

@ -5,9 +5,6 @@ import com.thevoxelbox.voxelsniper.SnipeData;
import com.thevoxelbox.voxelsniper.brush.perform.PerformBrush; import com.thevoxelbox.voxelsniper.brush.perform.PerformBrush;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
/**
* @author Giltwist
*/
public class TriangleBrush extends PerformBrush { public class TriangleBrush extends PerformBrush {
private double[] coordsOne = new double[3]; // Three corners private double[] coordsOne = new double[3]; // Three corners
private double[] coordsTwo = new double[3]; private double[] coordsTwo = new double[3];

Datei anzeigen

@ -7,10 +7,6 @@ import com.thevoxelbox.voxelsniper.SnipeData;
import com.thevoxelbox.voxelsniper.brush.perform.PerformBrush; import com.thevoxelbox.voxelsniper.brush.perform.PerformBrush;
import org.bukkit.ChatColor; 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 { public class UnderlayBrush extends PerformBrush {
private static final int DEFAULT_DEPTH = 3; private static final int DEFAULT_DEPTH = 3;
private int depth = DEFAULT_DEPTH; private int depth = DEFAULT_DEPTH;
@ -43,8 +39,6 @@ public class UnderlayBrush extends PerformBrush {
} }
break; break;
} else {
continue;
} }
} else { } else {
for (int d = 0; (d < this.depth); d++) { 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. memory[x + v.getBrushSize()][z + v.getBrushSize()] = 1; // stop it from checking any other blocks in this vertical 1x1 column.
} }
break; break;
} else {
continue;
} }
} else { } else {
for (int d = -1; (d < this.depth - 1); d++) { for (int d = -1; (d < this.depth - 1); d++) {

Datei anzeigen

@ -7,16 +7,12 @@ import org.bukkit.ChatColor;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import org.bukkit.block.BlockFace; import org.bukkit.block.BlockFace;
/**
* @author Gavjenks
*/
public class VoltMeterBrush extends Brush { public class VoltMeterBrush extends Brush {
public VoltMeterBrush() { public VoltMeterBrush() {
this.setName("VoltMeter"); this.setName("VoltMeter");
} }
@SuppressWarnings("deprecation")
private void data(final SnipeData v) { private void data(final SnipeData v) {
final AsyncBlock block = this.clampY(this.getTargetBlock().getX(), this.getTargetBlock().getY(), this.getTargetBlock().getZ()); final AsyncBlock block = this.clampY(this.getTargetBlock().getX(), this.getTargetBlock().getY(), this.getTargetBlock().getZ());
final int data = block.getPropertyId(); final int data = block.getPropertyId();

Datei anzeigen

@ -4,9 +4,7 @@ import com.thevoxelbox.voxelsniper.Message;
import com.thevoxelbox.voxelsniper.SnipeData; import com.thevoxelbox.voxelsniper.SnipeData;
import com.thevoxelbox.voxelsniper.brush.perform.PerformBrush; import com.thevoxelbox.voxelsniper.brush.perform.PerformBrush;
/**
* @author Piotr
*/
public class VoxelBrush extends PerformBrush { public class VoxelBrush extends PerformBrush {
public VoxelBrush() { public VoxelBrush() {

Datei anzeigen

@ -5,9 +5,7 @@ import com.thevoxelbox.voxelsniper.Message;
import com.thevoxelbox.voxelsniper.SnipeData; import com.thevoxelbox.voxelsniper.SnipeData;
import com.thevoxelbox.voxelsniper.brush.perform.PerformBrush; import com.thevoxelbox.voxelsniper.brush.perform.PerformBrush;
/**
* @author Voxel
*/
public class VoxelDiscBrush extends PerformBrush { public class VoxelDiscBrush extends PerformBrush {
public VoxelDiscBrush() { public VoxelDiscBrush() {

Datei anzeigen

@ -6,9 +6,7 @@ import com.thevoxelbox.voxelsniper.brush.perform.PerformBrush;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import org.bukkit.block.BlockFace; import org.bukkit.block.BlockFace;
/**
* @author Voxel
*/
public class VoxelDiscFaceBrush extends PerformBrush { public class VoxelDiscFaceBrush extends PerformBrush {
public VoxelDiscFaceBrush() { public VoxelDiscFaceBrush() {

Datei anzeigen

@ -1,4 +1,4 @@
/** /*
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) The VoxelBox <http://thevoxelbox.com>
@ -32,19 +32,12 @@ import org.bukkit.Bukkit;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
/**
* @author MikeMatrix
*/
public class WarpBrush extends Brush { public class WarpBrush extends Brush {
public WarpBrush() { public WarpBrush() {
this.setName("Warp"); this.setName("Warp");
} }
public static Class<?> inject() {
return WarpBrush.class;
}
@Override @Override
public final void info(final Message vm) { public final void info(final Message vm) {
vm.brushName(this.getName()); vm.brushName(this.getName());

Datei anzeigen

@ -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).
* <p> <p>
* Copyright (c) The VoxelBox <http://thevoxelbox.com> Copyright (c) The VoxelBox <http://thevoxelbox.com>
* Copyright (c) contributors Copyright (c) contributors
* <p> <p>
* Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions: furnished to do so, subject to the following conditions:
* <p> <p>
* The above copyright notice and this permission notice shall be included in The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software. all copies or substantial portions of the Software.
* <p> <p>
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 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 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE. THE SOFTWARE.
*/ */
package com.thevoxelbox.voxelsniper.brush.perform; package com.thevoxelbox.voxelsniper.brush.perform;

Datei anzeigen

@ -5,13 +5,12 @@
package com.thevoxelbox.voxelsniper.brush.perform; package com.thevoxelbox.voxelsniper.brush.perform;
import com.thevoxelbox.voxelsniper.Message; import com.thevoxelbox.voxelsniper.Message;
import com.thevoxelbox.voxelsniper.SnipeData;
/**
* @author Voxel
*/
public interface Performer { public interface Performer {
void parse(String[] args, com.thevoxelbox.voxelsniper.SnipeData v); void parse(String[] args, SnipeData v);
void showInfo(Message vm); void showInfo(Message vm);
} }

Datei anzeigen

@ -12,9 +12,7 @@ import java.util.TreeMap;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
/**
* @author Voxel
*/
/* The m/i/c system of naming performers: <placement-option>[replacement-option][extras] /* The m/i/c system of naming performers: <placement-option>[replacement-option][extras]
* *

Datei anzeigen

@ -6,10 +6,8 @@ package com.thevoxelbox.voxelsniper.brush.perform;
import com.boydti.fawe.bukkit.wrapper.AsyncBlock; import com.boydti.fawe.bukkit.wrapper.AsyncBlock;
import com.thevoxelbox.voxelsniper.Message; import com.thevoxelbox.voxelsniper.Message;
import com.thevoxelbox.voxelsniper.SnipeData;
/**
* @author Voxel
*/
public class pCombo extends vPerformer { public class pCombo extends vPerformer {
private int i; private int i;
@ -27,7 +25,7 @@ public class pCombo extends vPerformer {
} }
@Override @Override
public void init(com.thevoxelbox.voxelsniper.SnipeData v) { public void init(SnipeData v) {
w = v.getWorld(); w = v.getWorld();
i = v.getVoxelId(); i = v.getVoxelId();
d = v.getPropertyId(); d = v.getPropertyId();

Datei anzeigen

@ -6,10 +6,9 @@ package com.thevoxelbox.voxelsniper.brush.perform;
import com.boydti.fawe.bukkit.wrapper.AsyncBlock; import com.boydti.fawe.bukkit.wrapper.AsyncBlock;
import com.thevoxelbox.voxelsniper.Message; import com.thevoxelbox.voxelsniper.Message;
import com.thevoxelbox.voxelsniper.SnipeData;
/**
* @author Voxel
*/
public class pComboCombo extends vPerformer { public class pComboCombo extends vPerformer {
private int d; private int d;
@ -22,7 +21,7 @@ public class pComboCombo extends vPerformer {
} }
@Override @Override
public void init(com.thevoxelbox.voxelsniper.SnipeData v) { public void init(SnipeData v) {
w = v.getWorld(); w = v.getWorld();
d = v.getPropertyId(); d = v.getPropertyId();
dr = v.getReplaceData(); dr = v.getReplaceData();

Datei anzeigen

@ -6,10 +6,9 @@ package com.thevoxelbox.voxelsniper.brush.perform;
import com.boydti.fawe.bukkit.wrapper.AsyncBlock; import com.boydti.fawe.bukkit.wrapper.AsyncBlock;
import com.thevoxelbox.voxelsniper.Message; import com.thevoxelbox.voxelsniper.Message;
import com.thevoxelbox.voxelsniper.SnipeData;
/**
* @author Voxel
*/
public class pComboComboNoPhys extends vPerformer { public class pComboComboNoPhys extends vPerformer {
private int d; private int d;
@ -22,7 +21,7 @@ public class pComboComboNoPhys extends vPerformer {
} }
@Override @Override
public void init(com.thevoxelbox.voxelsniper.SnipeData v) { public void init(SnipeData v) {
w = v.getWorld(); w = v.getWorld();
d = v.getPropertyId(); d = v.getPropertyId();
dr = v.getReplaceData(); dr = v.getReplaceData();

Datei anzeigen

@ -6,10 +6,9 @@ package com.thevoxelbox.voxelsniper.brush.perform;
import com.boydti.fawe.bukkit.wrapper.AsyncBlock; import com.boydti.fawe.bukkit.wrapper.AsyncBlock;
import com.thevoxelbox.voxelsniper.Message; import com.thevoxelbox.voxelsniper.Message;
import com.thevoxelbox.voxelsniper.SnipeData;
/**
* @author Voxel
*/
public class pComboInk extends vPerformer { public class pComboInk extends vPerformer {
private int d; private int d;
@ -21,7 +20,7 @@ public class pComboInk extends vPerformer {
} }
@Override @Override
public void init(com.thevoxelbox.voxelsniper.SnipeData v) { public void init(SnipeData v) {
w = v.getWorld(); w = v.getWorld();
d = v.getPropertyId(); d = v.getPropertyId();
dr = v.getReplaceData(); dr = v.getReplaceData();

Datei anzeigen

@ -6,10 +6,9 @@ package com.thevoxelbox.voxelsniper.brush.perform;
import com.boydti.fawe.bukkit.wrapper.AsyncBlock; import com.boydti.fawe.bukkit.wrapper.AsyncBlock;
import com.thevoxelbox.voxelsniper.Message; import com.thevoxelbox.voxelsniper.Message;
import com.thevoxelbox.voxelsniper.SnipeData;
/**
* @author Voxel
*/
public class pComboInkNoPhys extends vPerformer { public class pComboInkNoPhys extends vPerformer {
private int d; private int d;
@ -21,7 +20,7 @@ public class pComboInkNoPhys extends vPerformer {
} }
@Override @Override
public void init(com.thevoxelbox.voxelsniper.SnipeData v) { public void init(SnipeData v) {
w = v.getWorld(); w = v.getWorld();
d = v.getPropertyId(); d = v.getPropertyId();
dr = v.getReplaceData(); dr = v.getReplaceData();

Datei anzeigen

@ -6,10 +6,9 @@ package com.thevoxelbox.voxelsniper.brush.perform;
import com.boydti.fawe.bukkit.wrapper.AsyncBlock; import com.boydti.fawe.bukkit.wrapper.AsyncBlock;
import com.thevoxelbox.voxelsniper.Message; import com.thevoxelbox.voxelsniper.Message;
import com.thevoxelbox.voxelsniper.SnipeData;
/**
* @author Voxel
*/
public class pComboMat extends vPerformer { public class pComboMat extends vPerformer {
private int d; private int d;
@ -21,7 +20,7 @@ public class pComboMat extends vPerformer {
} }
@Override @Override
public void init(com.thevoxelbox.voxelsniper.SnipeData v) { public void init(SnipeData v) {
w = v.getWorld(); w = v.getWorld();
d = v.getPropertyId(); d = v.getPropertyId();
i = v.getVoxelId(); i = v.getVoxelId();

Datei anzeigen

@ -6,10 +6,9 @@ package com.thevoxelbox.voxelsniper.brush.perform;
import com.boydti.fawe.bukkit.wrapper.AsyncBlock; import com.boydti.fawe.bukkit.wrapper.AsyncBlock;
import com.thevoxelbox.voxelsniper.Message; import com.thevoxelbox.voxelsniper.Message;
import com.thevoxelbox.voxelsniper.SnipeData;
/**
* @author Voxel
*/
public class pComboMatNoPhys extends vPerformer { public class pComboMatNoPhys extends vPerformer {
private int d; private int d;
@ -21,7 +20,7 @@ public class pComboMatNoPhys extends vPerformer {
} }
@Override @Override
public void init(com.thevoxelbox.voxelsniper.SnipeData v) { public void init(SnipeData v) {
w = v.getWorld(); w = v.getWorld();
d = v.getPropertyId(); d = v.getPropertyId();
i = v.getVoxelId(); i = v.getVoxelId();

Datei anzeigen

@ -6,10 +6,9 @@ package com.thevoxelbox.voxelsniper.brush.perform;
import com.boydti.fawe.bukkit.wrapper.AsyncBlock; import com.boydti.fawe.bukkit.wrapper.AsyncBlock;
import com.thevoxelbox.voxelsniper.Message; import com.thevoxelbox.voxelsniper.Message;
import com.thevoxelbox.voxelsniper.SnipeData;
/**
* @author Voxel
*/
public class pComboNoPhys extends vPerformer { public class pComboNoPhys extends vPerformer {
private int i; private int i;
@ -27,7 +26,7 @@ public class pComboNoPhys extends vPerformer {
} }
@Override @Override
public void init(com.thevoxelbox.voxelsniper.SnipeData v) { public void init(SnipeData v) {
w = v.getWorld(); w = v.getWorld();
i = v.getVoxelId(); i = v.getVoxelId();
d = v.getPropertyId(); d = v.getPropertyId();

Datei anzeigen

@ -6,10 +6,9 @@ package com.thevoxelbox.voxelsniper.brush.perform;
import com.boydti.fawe.bukkit.wrapper.AsyncBlock; import com.boydti.fawe.bukkit.wrapper.AsyncBlock;
import com.thevoxelbox.voxelsniper.Message; import com.thevoxelbox.voxelsniper.Message;
import com.thevoxelbox.voxelsniper.SnipeData;
/**
* @author Voxel
*/
public class pComboNoUndo extends vPerformer { public class pComboNoUndo extends vPerformer {
private int i; private int i;
@ -20,7 +19,7 @@ public class pComboNoUndo extends vPerformer {
} }
@Override @Override
public void init(com.thevoxelbox.voxelsniper.SnipeData v) { public void init(SnipeData v) {
w = v.getWorld(); w = v.getWorld();
i = v.getVoxelId(); i = v.getVoxelId();
d = v.getPropertyId(); d = v.getPropertyId();

Datei anzeigen

@ -6,11 +6,10 @@ package com.thevoxelbox.voxelsniper.brush.perform;
import com.boydti.fawe.bukkit.wrapper.AsyncBlock; import com.boydti.fawe.bukkit.wrapper.AsyncBlock;
import com.thevoxelbox.voxelsniper.Message; import com.thevoxelbox.voxelsniper.Message;
import com.thevoxelbox.voxelsniper.SnipeData;
import com.thevoxelbox.voxelsniper.util.VoxelList; import com.thevoxelbox.voxelsniper.util.VoxelList;
/**
* @author Voxel
*/
public class pExcludeCombo extends vPerformer { public class pExcludeCombo extends vPerformer {
private VoxelList excludeList; private VoxelList excludeList;
@ -30,7 +29,7 @@ public class pExcludeCombo extends vPerformer {
} }
@Override @Override
public void init(com.thevoxelbox.voxelsniper.SnipeData v) { public void init(SnipeData v) {
w = v.getWorld(); w = v.getWorld();
id = v.getVoxelId(); id = v.getVoxelId();
data = v.getPropertyId(); data = v.getPropertyId();

Datei anzeigen

@ -6,11 +6,10 @@ package com.thevoxelbox.voxelsniper.brush.perform;
import com.boydti.fawe.bukkit.wrapper.AsyncBlock; import com.boydti.fawe.bukkit.wrapper.AsyncBlock;
import com.thevoxelbox.voxelsniper.Message; import com.thevoxelbox.voxelsniper.Message;
import com.thevoxelbox.voxelsniper.SnipeData;
import com.thevoxelbox.voxelsniper.util.VoxelList; import com.thevoxelbox.voxelsniper.util.VoxelList;
/**
* @author Voxel
*/
public class pExcludeInk extends vPerformer { public class pExcludeInk extends vPerformer {
private VoxelList excludeList; private VoxelList excludeList;
@ -28,7 +27,7 @@ public class pExcludeInk extends vPerformer {
} }
@Override @Override
public void init(com.thevoxelbox.voxelsniper.SnipeData v) { public void init(SnipeData v) {
w = v.getWorld(); w = v.getWorld();
data = v.getPropertyId(); data = v.getPropertyId();
excludeList = v.getVoxelList(); excludeList = v.getVoxelList();

Datei anzeigen

@ -6,11 +6,10 @@ package com.thevoxelbox.voxelsniper.brush.perform;
import com.boydti.fawe.bukkit.wrapper.AsyncBlock; import com.boydti.fawe.bukkit.wrapper.AsyncBlock;
import com.thevoxelbox.voxelsniper.Message; import com.thevoxelbox.voxelsniper.Message;
import com.thevoxelbox.voxelsniper.SnipeData;
import com.thevoxelbox.voxelsniper.util.VoxelList; import com.thevoxelbox.voxelsniper.util.VoxelList;
/**
* @author Voxel
*/
public class pExcludeMat extends vPerformer { public class pExcludeMat extends vPerformer {
private VoxelList excludeList; private VoxelList excludeList;
@ -28,7 +27,7 @@ public class pExcludeMat extends vPerformer {
} }
@Override @Override
public void init(com.thevoxelbox.voxelsniper.SnipeData v) { public void init(SnipeData v) {
w = v.getWorld(); w = v.getWorld();
id = v.getVoxelId(); id = v.getVoxelId();
excludeList = v.getVoxelList(); excludeList = v.getVoxelList();

Datei anzeigen

@ -6,11 +6,10 @@ package com.thevoxelbox.voxelsniper.brush.perform;
import com.boydti.fawe.bukkit.wrapper.AsyncBlock; import com.boydti.fawe.bukkit.wrapper.AsyncBlock;
import com.thevoxelbox.voxelsniper.Message; import com.thevoxelbox.voxelsniper.Message;
import com.thevoxelbox.voxelsniper.SnipeData;
import com.thevoxelbox.voxelsniper.util.VoxelList; import com.thevoxelbox.voxelsniper.util.VoxelList;
/**
* @author Voxel
*/
public class pIncludeCombo extends vPerformer { public class pIncludeCombo extends vPerformer {
private VoxelList includeList; private VoxelList includeList;
@ -30,7 +29,7 @@ public class pIncludeCombo extends vPerformer {
} }
@Override @Override
public void init(com.thevoxelbox.voxelsniper.SnipeData v) { public void init(SnipeData v) {
w = v.getWorld(); w = v.getWorld();
id = v.getVoxelId(); id = v.getVoxelId();
data = v.getPropertyId(); data = v.getPropertyId();

Datei anzeigen

@ -6,11 +6,10 @@ package com.thevoxelbox.voxelsniper.brush.perform;
import com.boydti.fawe.bukkit.wrapper.AsyncBlock; import com.boydti.fawe.bukkit.wrapper.AsyncBlock;
import com.thevoxelbox.voxelsniper.Message; import com.thevoxelbox.voxelsniper.Message;
import com.thevoxelbox.voxelsniper.SnipeData;
import com.thevoxelbox.voxelsniper.util.VoxelList; import com.thevoxelbox.voxelsniper.util.VoxelList;
/**
* @author Voxel
*/
public class pIncludeInk extends vPerformer { public class pIncludeInk extends vPerformer {
private VoxelList includeList; private VoxelList includeList;
@ -28,7 +27,7 @@ public class pIncludeInk extends vPerformer {
} }
@Override @Override
public void init(com.thevoxelbox.voxelsniper.SnipeData v) { public void init(SnipeData v) {
w = v.getWorld(); w = v.getWorld();
data = v.getPropertyId(); data = v.getPropertyId();
includeList = v.getVoxelList(); includeList = v.getVoxelList();

Datei anzeigen

@ -6,11 +6,10 @@ package com.thevoxelbox.voxelsniper.brush.perform;
import com.boydti.fawe.bukkit.wrapper.AsyncBlock; import com.boydti.fawe.bukkit.wrapper.AsyncBlock;
import com.thevoxelbox.voxelsniper.Message; import com.thevoxelbox.voxelsniper.Message;
import com.thevoxelbox.voxelsniper.SnipeData;
import com.thevoxelbox.voxelsniper.util.VoxelList; import com.thevoxelbox.voxelsniper.util.VoxelList;
/**
* @author Voxel
*/
public class pIncludeMat extends vPerformer { public class pIncludeMat extends vPerformer {
private VoxelList includeList; private VoxelList includeList;
@ -28,7 +27,7 @@ public class pIncludeMat extends vPerformer {
} }
@Override @Override
public void init(com.thevoxelbox.voxelsniper.SnipeData v) { public void init(SnipeData v) {
w = v.getWorld(); w = v.getWorld();
id = v.getVoxelId(); id = v.getVoxelId();
includeList = v.getVoxelList(); includeList = v.getVoxelList();

Datei anzeigen

@ -6,10 +6,9 @@ package com.thevoxelbox.voxelsniper.brush.perform;
import com.boydti.fawe.bukkit.wrapper.AsyncBlock; import com.boydti.fawe.bukkit.wrapper.AsyncBlock;
import com.thevoxelbox.voxelsniper.Message; import com.thevoxelbox.voxelsniper.Message;
import com.thevoxelbox.voxelsniper.SnipeData;
/**
* @author Voxel
*/
public class pInk extends vPerformer { public class pInk extends vPerformer {
private int d; private int d;
@ -19,7 +18,7 @@ public class pInk extends vPerformer {
} }
@Override @Override
public void init(com.thevoxelbox.voxelsniper.SnipeData v) { public void init(SnipeData v) {
w = v.getWorld(); w = v.getWorld();
d = v.getPropertyId(); d = v.getPropertyId();
} }

Datei anzeigen

@ -6,10 +6,9 @@ package com.thevoxelbox.voxelsniper.brush.perform;
import com.boydti.fawe.bukkit.wrapper.AsyncBlock; import com.boydti.fawe.bukkit.wrapper.AsyncBlock;
import com.thevoxelbox.voxelsniper.Message; import com.thevoxelbox.voxelsniper.Message;
import com.thevoxelbox.voxelsniper.SnipeData;
/**
* @author Voxel
*/
public class pInkCombo extends vPerformer { public class pInkCombo extends vPerformer {
private int d; private int d;
@ -21,7 +20,7 @@ public class pInkCombo extends vPerformer {
} }
@Override @Override
public void init(com.thevoxelbox.voxelsniper.SnipeData v) { public void init(SnipeData v) {
w = v.getWorld(); w = v.getWorld();
d = v.getPropertyId(); d = v.getPropertyId();
dr = v.getReplaceData(); dr = v.getReplaceData();

Datei anzeigen

@ -2,10 +2,9 @@ package com.thevoxelbox.voxelsniper.brush.perform;
import com.boydti.fawe.bukkit.wrapper.AsyncBlock; import com.boydti.fawe.bukkit.wrapper.AsyncBlock;
import com.thevoxelbox.voxelsniper.Message; import com.thevoxelbox.voxelsniper.Message;
import com.thevoxelbox.voxelsniper.SnipeData;
/**
* @author Voxel
*/
public class pInkComboNoPhys extends vPerformer { public class pInkComboNoPhys extends vPerformer {
private int d; private int d;
@ -17,7 +16,7 @@ public class pInkComboNoPhys extends vPerformer {
} }
@Override @Override
public void init(com.thevoxelbox.voxelsniper.SnipeData v) { public void init(SnipeData v) {
w = v.getWorld(); w = v.getWorld();
d = v.getPropertyId(); d = v.getPropertyId();
dr = v.getReplaceData(); dr = v.getReplaceData();

Datei anzeigen

@ -6,10 +6,9 @@ package com.thevoxelbox.voxelsniper.brush.perform;
import com.boydti.fawe.bukkit.wrapper.AsyncBlock; import com.boydti.fawe.bukkit.wrapper.AsyncBlock;
import com.thevoxelbox.voxelsniper.Message; import com.thevoxelbox.voxelsniper.Message;
import com.thevoxelbox.voxelsniper.SnipeData;
/**
* @author Voxel
*/
public class pInkInk extends vPerformer { public class pInkInk extends vPerformer {
private int d; private int d;
@ -20,7 +19,7 @@ public class pInkInk extends vPerformer {
} }
@Override @Override
public void init(com.thevoxelbox.voxelsniper.SnipeData v) { public void init(SnipeData v) {
w = v.getWorld(); w = v.getWorld();
d = v.getPropertyId(); d = v.getPropertyId();
dr = v.getReplaceData(); dr = v.getReplaceData();

Datei anzeigen

@ -2,10 +2,9 @@ package com.thevoxelbox.voxelsniper.brush.perform;
import com.boydti.fawe.bukkit.wrapper.AsyncBlock; import com.boydti.fawe.bukkit.wrapper.AsyncBlock;
import com.thevoxelbox.voxelsniper.Message; import com.thevoxelbox.voxelsniper.Message;
import com.thevoxelbox.voxelsniper.SnipeData;
/**
* @author Voxel
*/
public class pInkInkNoPhys extends vPerformer { public class pInkInkNoPhys extends vPerformer {
private int d; private int d;
@ -16,7 +15,7 @@ public class pInkInkNoPhys extends vPerformer {
} }
@Override @Override
public void init(com.thevoxelbox.voxelsniper.SnipeData v) { public void init(SnipeData v) {
w = v.getWorld(); w = v.getWorld();
d = v.getPropertyId(); d = v.getPropertyId();
dr = v.getReplaceData(); dr = v.getReplaceData();

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen