Fix setbiome issue and tweak a few block names.

This commit is contained in:
wizjany
2013-04-09 17:17:15 -04:00
parent e7ae3b4ddf
commit 102a149dbb
3 changed files with 8 additions and 5 deletions

View File

@ -153,7 +153,7 @@ public class BiomeCommands {
if (args.hasFlag('p')) {
Vector2D pos = player.getPosition().toVector2D();
if (biomeMask != null && (biomeMask.matches2D(editSession, pos) ^ inverted)) {
if (biomeMask == null || (biomeMask.matches2D(editSession, pos) ^ inverted)) {
player.getWorld().setBiome(pos, target);
player.print("Biome changed to " + target.getName() + " at your current location.");
} else {
@ -166,7 +166,7 @@ public class BiomeCommands {
if (region instanceof FlatRegion) {
for (Vector2D pt : ((FlatRegion) region).asFlatRegion()) {
if (biomeMask != null && (biomeMask.matches2D(editSession, pt) ^ inverted)) {
if (biomeMask == null || (biomeMask.matches2D(editSession, pt) ^ inverted)) {
world.setBiome(pt, target);
++affected;
}
@ -176,7 +176,7 @@ public class BiomeCommands {
for (Vector pt : region) {
if (!alreadyVisited.contains((long)pt.getBlockX() << 32 | pt.getBlockZ())) {
alreadyVisited.add(((long)pt.getBlockX() << 32 | pt.getBlockZ()));
if (biomeMask != null && (biomeMask.matches(editSession, pt) ^ inverted)) {
if (biomeMask == null || (biomeMask.matches(editSession, pt) ^ inverted)) {
world.setBiome(pt.toVector2D(), target);
++affected;
}