From 0ca66ce350dbf94232020566aea1129885e9cab7 Mon Sep 17 00:00:00 2001 From: TomyLobo Date: Wed, 26 Oct 2011 23:23:26 +0200 Subject: [PATCH] Moved check for fastLightingAvailable from BukkitWorld.fixAfterFastMode to fixLighting and adjusted the description for //generate. --- .../java/com/sk89q/worldedit/bukkit/BukkitWorld.java | 10 ++++++---- .../sk89q/worldedit/commands/GenerationCommands.java | 4 +--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java b/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java index 2708ea3dd..765f6d72a 100644 --- a/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java +++ b/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java @@ -733,10 +733,8 @@ public class BukkitWorld extends LocalWorld { @Override public void fixAfterFastMode(Iterable chunks) { - if (fastLightingAvailable) { - fixLighting(chunks); - } - + fixLighting(chunks); + for (BlockVector2D chunkPos : chunks) { world.refreshChunk(chunkPos.getBlockX(), chunkPos.getBlockZ()); } @@ -748,6 +746,10 @@ public class BukkitWorld extends LocalWorld { @Override public void fixLighting(Iterable chunks) { + if (fastLightingAvailable) { + return; + } + try { Object notchWorld = CraftWorld_getHandle.invoke(world); for (BlockVector2D chunkPos : chunks) { diff --git a/src/main/java/com/sk89q/worldedit/commands/GenerationCommands.java b/src/main/java/com/sk89q/worldedit/commands/GenerationCommands.java index d8d6ee1be..848728fa5 100644 --- a/src/main/java/com/sk89q/worldedit/commands/GenerationCommands.java +++ b/src/main/java/com/sk89q/worldedit/commands/GenerationCommands.java @@ -322,7 +322,7 @@ public class GenerationCommands { @Command( aliases = { "/generate", "/gen", "/g" }, usage = " ", - desc = "Generates a shape according to a formula. -h for hollow, -r for untransformed coordinates, -o for unscaled, but offset from placement", + desc = "Generates a shape according to a formula. -h for hollow, -r for raw coordinates, -o for unscaled, but offset from placement", flags = "hro", min = 1, max = -1 @@ -351,7 +351,6 @@ public class GenerationCommands { shape = new ArbitraryShape(region) { @Override protected boolean isInside(double x, double y, double z) { - try { return expression.evaluate(x, y, z) > 0; } catch (Exception e) { @@ -371,7 +370,6 @@ public class GenerationCommands { shape = new ArbitraryShape(region) { @Override protected boolean isInside(double x, double y, double z) { - try { return expression.evaluate(x-placementX, y-placementY, z-placementZ) > 0; } catch (Exception e) {