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:
Wizjany
2011-09-03 12:54:20 -04:00
parent 8c0d0f9ed4
commit 4c00a24c1d
30 changed files with 873 additions and 652 deletions

View File

@ -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;
}
}

View File

@ -49,7 +49,7 @@ public class FloodFillTool implements BlockTool {
int initialType = world.getBlockType(clicked);
if (initialType == 0) {
if (initialType == BlockID.AIR) {
return true;
}

View File

@ -49,7 +49,7 @@ public class RecursivePickaxe implements BlockTool {
int initialType = world.getBlockType(clicked);
if (initialType == 0) {
if (initialType == BlockID.AIR) {
return true;
}

View File

@ -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;
}

View File

@ -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;