mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-17 14:03:55 +00:00
Abstracted all block IDs to BlockID and item ids to ItemType. Overloaded recently changed methods for compatibility and cleaned a few things up.
This commit is contained in:
@ -84,10 +84,6 @@ public class DistanceWand extends BrushTool implements DoubleActionTraceTool {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Bug workaround
|
||||
if (target.getBlockX() == 0 && target.getBlockY() == 0 && target.getBlockZ() == 0) {
|
||||
return null;
|
||||
}
|
||||
return target;
|
||||
}
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ public class FloodFillTool implements BlockTool {
|
||||
|
||||
int initialType = world.getBlockType(clicked);
|
||||
|
||||
if (initialType == 0) {
|
||||
if (initialType == BlockID.AIR) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ public class RecursivePickaxe implements BlockTool {
|
||||
|
||||
int initialType = world.getBlockType(clicked);
|
||||
|
||||
if (initialType == 0) {
|
||||
if (initialType == BlockID.AIR) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -40,15 +40,13 @@ public class SinglePickaxe implements BlockTool {
|
||||
if (world.getBlockType(clicked) == BlockID.BEDROCK
|
||||
&& !player.canDestroyBedrock()) {
|
||||
return true;
|
||||
} else if (world.getBlockType(clicked) == BlockID.TNT) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (config.superPickaxeDrop) {
|
||||
world.simulateBlockMine(clicked);
|
||||
}
|
||||
|
||||
world.setBlockType(clicked, 0);
|
||||
world.setBlockType(clicked, BlockID.AIR);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -33,6 +33,10 @@ public class SmoothBrush implements Brush {
|
||||
private int iterations;
|
||||
private boolean naturalOnly;
|
||||
|
||||
public SmoothBrush(int iterations) {
|
||||
this(iterations, false);
|
||||
}
|
||||
|
||||
public SmoothBrush(int iterations, boolean naturalOnly) {
|
||||
this.iterations = iterations;
|
||||
this.naturalOnly = naturalOnly;
|
||||
|
Reference in New Issue
Block a user