Lets show FAVS some love ❤️

This commit is contained in:
matt
2019-03-28 21:19:40 -04:00
parent 7ae8d567f3
commit 20098a78c8
29 changed files with 218 additions and 326 deletions

View File

@ -82,17 +82,18 @@ public class BiomeBrush extends Brush
if (args[1].equalsIgnoreCase("info"))
{
v.sendMessage(ChatColor.GOLD + "Biome Brush Parameters:");
String availableBiomes = "";
StringBuilder availableBiomes = new StringBuilder();
for (final Biome biome : Biome.values())
{
if (availableBiomes.isEmpty())
if (availableBiomes.length() == 0)
{
availableBiomes = ChatColor.DARK_GREEN + biome.name();
availableBiomes = new StringBuilder(ChatColor.DARK_GREEN + biome.name());
continue;
}
availableBiomes += ChatColor.RED + ", " + ChatColor.DARK_GREEN + biome.name();
availableBiomes.append(ChatColor.RED + ", " + ChatColor.DARK_GREEN)
.append(biome.name());
}
v.sendMessage(ChatColor.DARK_BLUE + "Available biomes: " + availableBiomes);
@ -100,15 +101,15 @@ public class BiomeBrush extends Brush
else
{
// allows biome names with spaces in their name
String biomeName = args[1];
StringBuilder biomeName = new StringBuilder(args[1]);
for (int i = 2; i < args.length; i++)
{
biomeName += " " + args[i];
biomeName.append(" ").append(args[i]);
}
for (final Biome biome : Biome.values())
{
if (biome.name().equalsIgnoreCase(biomeName))
if (biome.name().equalsIgnoreCase(biomeName.toString()))
{
this.selectedBiome = biome;
break;

View File

@ -49,10 +49,8 @@ public class BlendBallBrush extends BlendBrushBase
{
for (int y = 0; y <= brushSizeDoubled; y++)
{
for (int z = 0; z <= brushSizeDoubled; z++)
{
newMaterials[x][y][z] = oldMaterials[x + 1][y + 1][z + 1];
}
System.arraycopy(oldMaterials[x + 1][y + 1], 1, newMaterials[x][y], 0,
brushSizeDoubled + 1);
}
}

View File

@ -42,10 +42,7 @@ public class BlendDiscBrush extends BlendBrushBase
// Log current materials into newmats
for (int x = 0; x <= brushSizeDoubled; x++)
{
for (int z = 0; z <= brushSizeDoubled; z++)
{
newMaterials[x][z] = oldMaterials[x + 1][z + 1];
}
System.arraycopy(oldMaterials[x + 1], 1, newMaterials[x], 0, brushSizeDoubled + 1);
}
// Blend materials

View File

@ -49,10 +49,8 @@ public class BlendVoxelBrush extends BlendBrushBase
{
for (int y = 0; y <= brushSizeDoubled; y++)
{
for (int z = 0; z <= brushSizeDoubled; z++)
{
newMaterials[x][y][z] = oldMaterials[x + 1][y + 1][z + 1];
}
System.arraycopy(oldMaterials[x + 1][y + 1], 1, newMaterials[x][y], 0,
brushSizeDoubled + 1);
}
}

View File

@ -42,10 +42,7 @@ public class BlendVoxelDiscBrush extends BlendBrushBase
// Log current materials into newmats
for (int x = 0; x <= brushSizeDoubled; x++)
{
for (int z = 0; z <= brushSizeDoubled; z++)
{
newMaterials[x][z] = oldMaterials[x + 1][z + 1];
}
System.arraycopy(oldMaterials[x + 1], 1, newMaterials[x], 0, brushSizeDoubled + 1);
}
// Blend materials

View File

@ -120,10 +120,7 @@ public class BlobBrush extends PerformBrush
{
for (int y = brushSizeDoubled; y >= 0; y--)
{
for (int z = brushSizeDoubled; z >= 0; z--)
{
splat[x][y][z] = tempSplat[x][y][z];
}
System.arraycopy(tempSplat[x][y], 0, splat[x][y], 0, brushSizeDoubled + 1);
}
}
}
@ -218,10 +215,7 @@ public class BlobBrush extends PerformBrush
{
for (int y = brushSizeDoubled; y >= 0; y--)
{
for (int z = brushSizeDoubled; z >= 0; z--)
{
splat[x][y][z] = tempSplat[x][y][z];
}
System.arraycopy(tempSplat[x][y], 0, splat[x][y], 0, brushSizeDoubled + 1);
}
}
}

View File

@ -83,11 +83,11 @@ public class JockeyBrush extends Brush
{
if (jockeyType == JockeyType.INVERSE_PLAYER_ONLY || jockeyType == JockeyType.INVERSE_ALL_ENTITIES)
{
player.setPassenger(closest);
player.addPassenger(closest);
}
else
{
closest.setPassenger(player);
closest.addPassenger(player);
jockeyedEntity = closest;
}
v.sendMessage(ChatColor.GREEN + "You are now saddles on entity: " + closest.getEntityId());
@ -113,7 +113,7 @@ public class JockeyBrush extends Brush
{
if (jockeyType == JockeyType.STACK_ALL_ENTITIES)
{
lastEntity.setPassenger(entity);
lastEntity.addPassenger(entity);
lastEntity = entity;
stackHeight++;
}
@ -121,7 +121,7 @@ public class JockeyBrush extends Brush
{
if (entity instanceof Player)
{
lastEntity.setPassenger(entity);
lastEntity.addPassenger(entity);
lastEntity = entity;
stackHeight++;
}

View File

@ -1,5 +1,6 @@
package com.thevoxelbox.voxelsniper.brush;
import com.sk89q.worldedit.bukkit.BukkitAdapter;
import com.sk89q.worldedit.world.block.BlockType;
import com.sk89q.worldedit.world.block.BlockTypes;
import com.sk89q.worldedit.world.registry.BlockMaterial;
@ -14,8 +15,7 @@ import org.bukkit.Material;
*
* @author Gavjenks
*/
public class OverlayBrush extends PerformBrush
{
public class OverlayBrush extends PerformBrush {
private static final int DEFAULT_DEPTH = 3;
private int depth = DEFAULT_DEPTH;
private boolean allBlocks = false;
@ -23,40 +23,38 @@ public class OverlayBrush extends PerformBrush
/**
*
*/
public OverlayBrush()
{
public OverlayBrush() {
this.setName("Overlay (Topsoil Filling)");
}
private void overlay(final SnipeData v)
{
private void overlay(final SnipeData v) {
final int brushSize = v.getBrushSize();
final double brushSizeSquared = Math.pow(brushSize + 0.5, 2);
for (int z = brushSize; z >= -brushSize; z--)
{
for (int x = brushSize; x >= -brushSize; x--)
{
for (int z = brushSize; z >= -brushSize; z--) {
for (int x = brushSize; x >= -brushSize; x--) {
// check if column is valid
// column is valid if it has no solid block right above the clicked layer
final int materialId = this.getBlockIdAt(this.getTargetBlock().getX() + x, this.getTargetBlock().getY() + 1, this.getTargetBlock().getZ() + z);
if (isIgnoredBlock(materialId))
{
if ((Math.pow(x, 2) + Math.pow(z, 2)) <= brushSizeSquared)
{
for (int y = this.getTargetBlock().getY(); y > 0; y--)
{
final int materialId = this.getBlockIdAt(this.getTargetBlock().getX() + x,
this.getTargetBlock().getY() + 1, this.getTargetBlock().getZ() + z);
if (isIgnoredBlock(materialId)) {
if ((Math.pow(x, 2) + Math.pow(z, 2)) <= brushSizeSquared) {
for (int y = this.getTargetBlock().getY(); y > 0; y--) {
// check for surface
final int layerBlockId = this.getBlockIdAt(this.getTargetBlock().getX() + x, y, this.getTargetBlock().getZ() + z);
if (!isIgnoredBlock(layerBlockId))
{
for (int currentDepth = y; y - currentDepth < depth; currentDepth--)
{
final int currentBlockId = this.getBlockIdAt(this.getTargetBlock().getX() + x, currentDepth, this.getTargetBlock().getZ() + z);
if (isOverrideableMaterial(currentBlockId))
{
this.current.perform(this.clampY(this.getTargetBlock().getX() + x, currentDepth, this.getTargetBlock().getZ() + z));
final int layerBlockId =
this.getBlockIdAt(this.getTargetBlock().getX() + x, y,
this.getTargetBlock().getZ() + z);
if (!isIgnoredBlock(layerBlockId)) {
for (int currentDepth = y;
y - currentDepth < depth; currentDepth--) {
final int currentBlockId =
this.getBlockIdAt(this.getTargetBlock().getX() + x,
currentDepth, this.getTargetBlock().getZ() + z);
if (isOverrideableMaterial(currentBlockId)) {
this.current.perform(
this.clampY(this.getTargetBlock().getX() + x,
currentDepth, this.getTargetBlock().getZ() + z));
}
}
break;
@ -70,9 +68,7 @@ public class OverlayBrush extends PerformBrush
v.owner().storeUndo(this.current.getUndo());
}
@SuppressWarnings("deprecation")
private boolean isIgnoredBlock(int materialId)
{
@SuppressWarnings("deprecation") private boolean isIgnoredBlock(int materialId) {
BlockType type = BlockTypes.get(materialId);
switch (type.getResource().toUpperCase()) {
case "WATER":
@ -84,68 +80,65 @@ public class OverlayBrush extends PerformBrush
return mat.isTranslucent();
}
@SuppressWarnings("deprecation")
private boolean isOverrideableMaterial(int materialId)
{
@SuppressWarnings("deprecation") private boolean isOverrideableMaterial(int materialId) {
BlockMaterial mat = BlockTypes.get(materialId).getMaterial();
if (allBlocks && !(mat.isAir()))
{
if (allBlocks && !(mat.isAir())) {
return true;
}
if (!mat.isFragileWhenPushed() && mat.isFullCube()) {
return true;
}
return false;
return !mat.isFragileWhenPushed() && mat.isFullCube();
}
private void overlayTwo(final SnipeData v)
{
private void overlayTwo(final SnipeData v) {
final int brushSize = v.getBrushSize();
final double brushSizeSquared = Math.pow(brushSize + 0.5, 2);
final int[][] memory = new int[brushSize * 2 + 1][brushSize * 2 + 1];
for (int z = brushSize; z >= -brushSize; z--)
{
for (int x = brushSize; x >= -brushSize; x--)
{
for (int z = brushSize; z >= -brushSize; z--) {
for (int x = brushSize; x >= -brushSize; x--) {
boolean surfaceFound = false;
for (int y = this.getTargetBlock().getY(); y > 0 && !surfaceFound; y--)
{ // start scanning from the height you clicked at
if (memory[x + brushSize][z + brushSize] != 1)
{ // if haven't already found the surface in this column
if ((Math.pow(x, 2) + Math.pow(z, 2)) <= brushSizeSquared)
{ // if inside of the column...
if (!this.getBlockAt(this.getTargetBlock().getX() + x, y - 1, this.getTargetBlock().getZ() + z).isEmpty())
{ // if not a floating block (like one of Notch'world pools)
if (this.getBlockAt(this.getTargetBlock().getX() + x, y + 1, this.getTargetBlock().getZ() + z).isEmpty())
{ // must start at surface... this prevents it filling stuff in if
for (int y = this.getTargetBlock().getY();
y > 0 && !surfaceFound; y--) { // start scanning from the height you clicked at
if (memory[x + brushSize][z + brushSize]
!= 1) { // if haven't already found the surface in this column
if ((Math.pow(x, 2) + Math.pow(z, 2))
<= brushSizeSquared) { // if inside of the column...
if (!this.getBlockAt(this.getTargetBlock().getX() + x, y - 1,
this.getTargetBlock().getZ() + z)
.isEmpty()) { // if not a floating block (like one of Notch'world pools)
if (this.getBlockAt(this.getTargetBlock().getX() + x, y + 1,
this.getTargetBlock().getZ() + z)
.isEmpty()) { // must start at surface... this prevents it filling stuff in if
// you click in a wall and it starts out below surface.
if (!this.allBlocks)
{ // if the override parameter has not been activated, go to the switch that filters out manmade stuff.
if (!this.allBlocks) { // if the override parameter has not been activated, go to the switch that filters out manmade stuff.
BlockType type = BlockTypes.get(this.getBlockIdAt(this.getTargetBlock().getX() + x, y, this.getTargetBlock().getZ() + z));
BlockType type = BukkitAdapter.asBlockType((this
.getBlockType(this.getTargetBlock().getX() + x, y,
this.getTargetBlock().getZ() + z)));
BlockMaterial mat = type.getMaterial();
if (mat.isSolid() && mat.isFullCube() && !mat.hasContainer()) {
if (mat.isSolid() && mat.isFullCube() && !mat
.hasContainer()) {
for (int d = 1; (d < this.depth + 1); d++) {
this.current.perform(this.clampY(this.getTargetBlock().getX() + x, y + d, this.getTargetBlock().getZ() + z)); // fills down as many layers as you specify
this.current.perform(
this.clampY(this.getTargetBlock().getX() + x,
y + d, this.getTargetBlock().getZ()
+ z)); // fills down as many layers as you specify
// in parameters
memory[x + brushSize][z + brushSize] = 1; // stop it from checking any other blocks in this vertical 1x1 column.
memory[x + brushSize][z + brushSize] =
1; // stop it from checking any other blocks in this vertical 1x1 column.
}
surfaceFound = true;
continue;
} else {
continue;
}
}
else
{
for (int d = 1; (d < this.depth + 1); d++)
{
this.current.perform(this.clampY(this.getTargetBlock().getX() + x, y + d, this.getTargetBlock().getZ() + z)); // fills down as many layers as you specify in
} else {
for (int d = 1; (d < this.depth + 1); d++) {
this.current.perform(
this.clampY(this.getTargetBlock().getX() + x, y + d,
this.getTargetBlock().getZ()
+ z)); // fills down as many layers as you specify in
// parameters
memory[x + brushSize][z + brushSize] = 1; // stop it from checking any other blocks in this vertical 1x1 column.
memory[x + brushSize][z + brushSize] =
1; // stop it from checking any other blocks in this vertical 1x1 column.
}
surfaceFound = true;
}
@ -161,74 +154,58 @@ public class OverlayBrush extends PerformBrush
v.owner().storeUndo(this.current.getUndo());
}
@Override
protected final void arrow(final SnipeData v)
{
@Override protected final void arrow(final SnipeData v) {
this.overlay(v);
}
@Override
protected final void powder(final SnipeData v)
{
@Override protected final void powder(final SnipeData v) {
this.overlayTwo(v);
}
@Override
public final void info(final Message vm)
{
@Override public final void info(final Message vm) {
vm.brushName(this.getName());
vm.size();
}
@Override
public final void parameters(final String[] par, final SnipeData v)
{
for (int i = 1; i < par.length; i++)
{
@Override public final void parameters(final String[] par, final SnipeData v) {
for (int i = 1; i < par.length; i++) {
final String parameter = par[i];
if (parameter.equalsIgnoreCase("info"))
{
if (parameter.equalsIgnoreCase("info")) {
v.sendMessage(ChatColor.GOLD + "Overlay brush parameters:");
v.sendMessage(ChatColor.AQUA + "d[number] (ex: d3) How many blocks deep you want to replace from the surface.");
v.sendMessage(ChatColor.BLUE + "all (ex: /b over all) Sets the brush to overlay over ALL materials, not just natural surface ones (will no longer ignore trees and buildings). The parameter /some will set it back to default.");
v.sendMessage(ChatColor.AQUA
+ "d[number] (ex: d3) How many blocks deep you want to replace from the surface.");
v.sendMessage(ChatColor.BLUE
+ "all (ex: /b over all) Sets the brush to overlay over ALL materials, not just natural surface ones (will no longer ignore trees and buildings). The parameter /some will set it back to default.");
return;
}
if (parameter.startsWith("d"))
{
if (parameter.startsWith("d")) {
try {
this.depth = Integer.parseInt(parameter.replace("d", ""));
if (this.depth < 1)
{
if (this.depth < 1) {
this.depth = 1;
}
v.sendMessage(ChatColor.AQUA + "Depth set to " + this.depth);
} catch (NumberFormatException e) {
} catch (NumberFormatException e) {
v.sendMessage(ChatColor.RED + "Depth isn't a number.");
}
}
else if (parameter.startsWith("all"))
{
} else if (parameter.startsWith("all")) {
this.allBlocks = true;
v.sendMessage(ChatColor.BLUE + "Will overlay over any block." + this.depth);
}
else if (parameter.startsWith("some"))
{
} else if (parameter.startsWith("some")) {
this.allBlocks = false;
v.sendMessage(ChatColor.BLUE + "Will overlay only natural block types." + this.depth);
}
else
{
v.sendMessage(ChatColor.RED + "Invalid brush parameters! use the info parameter to display parameter info.");
v.sendMessage(
ChatColor.BLUE + "Will overlay only natural block types." + this.depth);
} else {
v.sendMessage(ChatColor.RED
+ "Invalid brush parameters! use the info parameter to display parameter info.");
}
}
}
@Override
public String getPermissionNode()
{
@Override public String getPermissionNode() {
return "voxelsniper.brush.overlay";
}
}

View File

@ -163,16 +163,11 @@ public class Rot2DBrush extends Brush
{
this.bSize = v.getBrushSize();
switch (this.mode)
{
case 0:
this.getMatrix();
this.rotate(v);
break;
default:
v.sendMessage(ChatColor.RED + "Something went wrong.");
break;
if (this.mode == 0) {
this.getMatrix();
this.rotate(v);
} else {
v.sendMessage(ChatColor.RED + "Something went wrong.");
}
}
@ -181,16 +176,11 @@ public class Rot2DBrush extends Brush
{
this.bSize = v.getBrushSize();
switch (this.mode)
{
case 0:
this.getMatrix();
this.rotate(v);
break;
default:
v.sendMessage(ChatColor.RED + "Something went wrong.");
break;
if (this.mode == 0) {
this.getMatrix();
this.rotate(v);
} else {
v.sendMessage(ChatColor.RED + "Something went wrong.");
}
}

View File

@ -164,16 +164,11 @@ public class Rot2DvertBrush extends Brush
{
this.bSize = v.getBrushSize();
switch (this.mode)
{
case 0:
this.getMatrix();
this.rotate(v);
break;
default:
v.owner().getPlayer().sendMessage(ChatColor.RED + "Something went wrong.");
break;
if (this.mode == 0) {
this.getMatrix();
this.rotate(v);
} else {
v.owner().getPlayer().sendMessage(ChatColor.RED + "Something went wrong.");
}
}
@ -182,16 +177,11 @@ public class Rot2DvertBrush extends Brush
{
this.bSize = v.getBrushSize();
switch (this.mode)
{
case 0:
this.getMatrix();
this.rotate(v);
break;
default:
v.owner().getPlayer().sendMessage(ChatColor.RED + "Something went wrong.");
break;
if (this.mode == 0) {
this.getMatrix();
this.rotate(v);
} else {
v.owner().getPlayer().sendMessage(ChatColor.RED + "Something went wrong.");
}
}

View File

@ -248,16 +248,11 @@ public class Rot3DBrush extends Brush
{
this.bSize = v.getBrushSize();
switch (this.mode)
{
case 0:
this.getMatrix();
this.rotate(v);
break;
default:
v.owner().getPlayer().sendMessage(ChatColor.RED + "Something went wrong.");
break;
if (this.mode == 0) {
this.getMatrix();
this.rotate(v);
} else {
v.owner().getPlayer().sendMessage(ChatColor.RED + "Something went wrong.");
}
}
@ -266,16 +261,11 @@ public class Rot3DBrush extends Brush
{
this.bSize = v.getBrushSize();
switch (this.mode)
{
case 0:
this.getMatrix();
this.rotate(v);
break;
default:
v.owner().getPlayer().sendMessage(ChatColor.RED + "Something went wrong.");
break;
if (this.mode == 0) {
this.getMatrix();
this.rotate(v);
} else {
v.owner().getPlayer().sendMessage(ChatColor.RED + "Something went wrong.");
}
}

View File

@ -50,10 +50,8 @@ public class ShellBallBrush extends Brush
{
for (int y = 0; y <= brushSizeDoubled; y++)
{
for (int z = 0; z <= brushSizeDoubled; z++)
{
newMaterials[x][y][z] = oldMaterials[x + 1][y + 1][z + 1];
}
System.arraycopy(oldMaterials[x + 1][y + 1], 1, newMaterials[x][y], 0,
brushSizeDoubled + 1);
}
}

View File

@ -49,10 +49,8 @@ public class ShellVoxelBrush extends Brush
{
for (int y = 0; y <= brushSizeSquared; y++)
{
for (int z = 0; z <= brushSizeSquared; z++)
{
newMaterials[x][y][z] = oldMaterials[x + 1][y + 1][z + 1];
}
System.arraycopy(oldMaterials[x + 1][y + 1], 1, newMaterials[x][y], 0,
brushSizeSquared + 1);
}
}
int temp;

View File

@ -152,22 +152,17 @@ public class SnowConeBrush extends Brush
@Override
protected final void powder(final SnipeData v)
{
switch (getTargetBlock().getType())
{
case SNOW:
this.addSnow(v, this.getTargetBlock());
break;
default:
Block blockAbove = getTargetBlock().getRelative(BlockFace.UP);
if (blockAbove != null && BukkitAdapter.adapt(blockAbove.getType()).getMaterial().isAir())
{
addSnow(v, blockAbove);
}
else
{
v.owner().getPlayer().sendMessage(ChatColor.RED + "Error: Center block neither snow nor air.");
}
break;
if (getTargetBlock().getType() == Material.SNOW) {
this.addSnow(v, this.getTargetBlock());
} else {
Block blockAbove = getTargetBlock().getRelative(BlockFace.UP);
if (blockAbove != null && BukkitAdapter.adapt(blockAbove.getType()).getMaterial()
.isAir()) {
addSnow(v, blockAbove);
} else {
v.owner().getPlayer()
.sendMessage(ChatColor.RED + "Error: Center block neither snow nor air.");
}
}
}

View File

@ -730,9 +730,7 @@ public class SpiralStaircaseBrush extends Brush
v.sendMessage(ChatColor.BLUE + "Staircase type: " + this.stairtype);
return;
} catch (InputParseException ignore) {}
switch (par[i].toLowerCase()) {
case "block":
if ("block".equals(par[i].toLowerCase())) {
}
if (par[i].equalsIgnoreCase("block") || par[i].equalsIgnoreCase("step") || par[i].equalsIgnoreCase("woodstair") || par[i].equalsIgnoreCase("cobblestair"))
{

View File

@ -130,10 +130,9 @@ public class SplatterBallBrush extends PerformBrush
{
for (int y = 2 * v.getBrushSize(); y >= 0; y--)
{
for (int z = 2 * v.getBrushSize(); z >= 0; z--)
{
splat[x][y][z] = tempSplat[x][y][z];
}
if (2 * v.getBrushSize() + 1 >= 0)
System.arraycopy(tempSplat[x][y], 0, splat[x][y], 0,
2 * v.getBrushSize() + 1);
}
}
}

View File

@ -115,10 +115,8 @@ public class SplatterDiscBrush extends PerformBrush
// integrate tempsplat back into splat at end of iteration
for (int x = 2 * v.getBrushSize(); x >= 0; x--)
{
for (int y = 2 * v.getBrushSize(); y >= 0; y--)
{
splat[x][y] = tempSplat[x][y];
}
if (2 * v.getBrushSize() + 1 >= 0)
System.arraycopy(tempSplat[x], 0, splat[x], 0, 2 * v.getBrushSize() + 1);
}
}
this.growPercent = gref;

View File

@ -104,10 +104,8 @@ public class SplatterOverlayBrush extends PerformBrush
// integrate tempsplat back into splat at end of iteration
for (int x = 2 * v.getBrushSize(); x >= 0; x--)
{
for (int y = 2 * v.getBrushSize(); y >= 0; y--)
{
splat[x][y] = tempSplat[x][y];
}
if (2 * v.getBrushSize() + 1 >= 0)
System.arraycopy(tempSplat[x], 0, splat[x], 0, 2 * v.getBrushSize() + 1);
}
}
this.growPercent = gref;
@ -240,10 +238,8 @@ public class SplatterOverlayBrush extends PerformBrush
// integrate tempsplat back into splat at end of iteration
for (int x = 2 * v.getBrushSize(); x >= 0; x--)
{
for (int y = 2 * v.getBrushSize(); y >= 0; y--)
{
splat[x][y] = tempsplat[x][y];
}
if (2 * v.getBrushSize() + 1 >= 0)
System.arraycopy(tempsplat[x], 0, splat[x], 0, 2 * v.getBrushSize() + 1);
}
}
this.growPercent = gref;

View File

@ -130,10 +130,9 @@ public class SplatterVoxelBrush extends PerformBrush
{
for (int y = 2 * v.getBrushSize(); y >= 0; y--)
{
for (int z = 2 * v.getBrushSize(); z >= 0; z--)
{
splat[x][y][z] = tempSplat[x][y][z];
}
if (2 * v.getBrushSize() + 1 >= 0)
System.arraycopy(tempSplat[x][y], 0, splat[x][y], 0,
2 * v.getBrushSize() + 1);
}
}
}

View File

@ -111,10 +111,8 @@ public class SplatterVoxelDiscBrush extends PerformBrush
// integrate tempsplat back into splat at end of iteration
for (int x = 2 * v.getBrushSize(); x >= 0; x--)
{
for (int y = 2 * v.getBrushSize(); y >= 0; y--)
{
splat[x][y] = tempSplat[x][y];
}
if (2 * v.getBrushSize() + 1 >= 0)
System.arraycopy(tempSplat[x], 0, splat[x], 0, 2 * v.getBrushSize() + 1);
}
}
this.growPercent = gref;

View File

@ -104,7 +104,7 @@ public class WallSider extends Brush{
if (this.c > 4 || this.c < 0) {
this.c = 4;
}
snipeData.sendMessage(ChatColor.AQUA + "Orientation set to " + this.facings[this.c]);
snipeData.sendMessage(ChatColor.AQUA + "Orientation set to " + facings[this.c]);
}
else if (lowerCase.startsWith("true")) {
this.e = 0.5;

View File

@ -12,7 +12,7 @@ import com.thevoxelbox.voxelsniper.Message;
public interface Performer
{
public void parse(String[] args, com.thevoxelbox.voxelsniper.SnipeData v);
void parse(String[] args, com.thevoxelbox.voxelsniper.SnipeData v);
public void showInfo(Message vm);
void showInfo(Message vm);
}

View File

@ -99,7 +99,7 @@ public enum PerformerE
public static String performer_list_short = "";
public static String performer_list_long = "";
private PerformerE(Class<? extends vPerformer> c, String s, String l)
PerformerE(Class<? extends vPerformer> c, String s, String l)
{
pclass = c;
short_name = s;
@ -116,28 +116,12 @@ public enum PerformerE
p = pclass.getConstructor().newInstance();
return p;
}
catch (InstantiationException ex)
{
Logger.getLogger(PerformerE.class.getName()).log(Level.SEVERE, null, ex);
}
catch (IllegalAccessException ex)
{
Logger.getLogger(PerformerE.class.getName()).log(Level.SEVERE, null, ex);
}
catch (IllegalArgumentException ex)
{
Logger.getLogger(PerformerE.class.getName()).log(Level.SEVERE, null, ex);
}
catch (InvocationTargetException ex)
catch (InstantiationException | IllegalAccessException | InvocationTargetException | IllegalArgumentException ex)
{
Logger.getLogger(PerformerE.class.getName()).log(Level.SEVERE, null, ex);
}
}
catch (NoSuchMethodException ex)
{
Logger.getLogger(PerformerE.class.getName()).log(Level.SEVERE, null, ex);
}
catch (SecurityException ex)
catch (NoSuchMethodException | SecurityException ex)
{
Logger.getLogger(PerformerE.class.getName()).log(Level.SEVERE, null, ex);
}