3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-10 05:20:04 +01:00

Fix setbiome issue and tweak a few block names.

Dieser Commit ist enthalten in:
wizjany 2013-04-09 17:17:15 -04:00
Ursprung e7ae3b4ddf
Commit 102a149dbb
3 geänderte Dateien mit 8 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -478,6 +478,9 @@ public class WorldEdit {
case NETHER_BRICK: case NETHER_BRICK:
data = 6; data = 6;
break; break;
case QUARTZ_BLOCK:
data = 7;
break;
default: default:
throw new InvalidItemException(arg, "Invalid step type '" + typeAndData[1] + "'"); throw new InvalidItemException(arg, "Invalid step type '" + typeAndData[1] + "'");

Datei anzeigen

@ -179,7 +179,7 @@ public enum BlockType {
CARROTS(BlockID.CARROTS, "Carrots", "carrots", "carrotsplant", "carrotsblock"), CARROTS(BlockID.CARROTS, "Carrots", "carrots", "carrotsplant", "carrotsblock"),
POTATOES(BlockID.POTATOES, "Potatoes", "patatoes", "potatoesblock"), POTATOES(BlockID.POTATOES, "Potatoes", "patatoes", "potatoesblock"),
WOODEN_BUTTON(BlockID.WOODEN_BUTTON, "Wooden button", "woodbutton", "woodenbutton"), WOODEN_BUTTON(BlockID.WOODEN_BUTTON, "Wooden button", "woodbutton", "woodenbutton"),
HEAD(BlockID.HEAD, "Head", "head", "headmount", "mount"), HEAD(BlockID.HEAD, "Head", "head", "skull"),
ANVIL(BlockID.ANVIL, "Anvil", "anvil", "blacksmith"), ANVIL(BlockID.ANVIL, "Anvil", "anvil", "blacksmith"),
TRAPPED_CHEST(BlockID.TRAPPED_CHEST, "Trapped Chest", "trappedchest", "redstonechest"), TRAPPED_CHEST(BlockID.TRAPPED_CHEST, "Trapped Chest", "trappedchest", "redstonechest"),
PRESSURE_PLATE_LIGHT(BlockID.PRESSURE_PLATE_LIGHT, "Weighted Pressure Plate (Light)", "lightpressureplate"), PRESSURE_PLATE_LIGHT(BlockID.PRESSURE_PLATE_LIGHT, "Weighted Pressure Plate (Light)", "lightpressureplate"),
@ -190,7 +190,7 @@ public enum BlockType {
REDSTONE_BLOCK(BlockID.REDSTONE_BLOCK, "Block of Redstone", "redstoneblock", "blockofredstone"), REDSTONE_BLOCK(BlockID.REDSTONE_BLOCK, "Block of Redstone", "redstoneblock", "blockofredstone"),
QUARTZ_ORE(BlockID.QUARTZ_ORE, "Nether Quartz Ore", "quartzore", "netherquartzore"), QUARTZ_ORE(BlockID.QUARTZ_ORE, "Nether Quartz Ore", "quartzore", "netherquartzore"),
HOPPER(BlockID.HOPPER, "Hopper", "hopper"), HOPPER(BlockID.HOPPER, "Hopper", "hopper"),
QUARTZ_BLOCK(BlockID.QUARTZ_BLOCK, "Block of Quartz", "quartzblock"), QUARTZ_BLOCK(BlockID.QUARTZ_BLOCK, "Block of Quartz", "quartzblock", "quartz"),
QUARTZ_STAIRS(BlockID.QUARTZ_STAIRS, "Quartz Stairs", "quartzstairs"), QUARTZ_STAIRS(BlockID.QUARTZ_STAIRS, "Quartz Stairs", "quartzstairs"),
ACTIVATOR_RAIL(BlockID.ACTIVATOR_RAIL, "Activator Rail", "activatorrail", "tntrail", "activatortrack"), ACTIVATOR_RAIL(BlockID.ACTIVATOR_RAIL, "Activator Rail", "activatorrail", "tntrail", "activatortrack"),
DROPPER(BlockID.DROPPER, "Dropper", "dropper"); DROPPER(BlockID.DROPPER, "Dropper", "dropper");

Datei anzeigen

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