From 8122c9d4155d024728a282d4dff4a26df7357e8f Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Mon, 28 Nov 2016 14:48:09 +1100 Subject: [PATCH] Fix setlight and setskylight commands Fixes #314 --- core/src/main/java/com/boydti/fawe/config/BBC.java | 2 +- .../java/com/sk89q/worldedit/command/RegionCommands.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/com/boydti/fawe/config/BBC.java b/core/src/main/java/com/boydti/fawe/config/BBC.java index 801e3384..3828f7fa 100644 --- a/core/src/main/java/com/boydti/fawe/config/BBC.java +++ b/core/src/main/java/com/boydti/fawe/config/BBC.java @@ -22,7 +22,7 @@ public enum BBC { */ PREFIX("&8(&4&lFAWE&8)&r&7", "Info"), SCHEMATIC_PASTING("&7The schematic is pasting. This cannot be undone.", "Info"), - FIX_LIGHTING_SELECTION("&7Lighting has been fixed in %s0 chunks. (It may take a second for the packets to send)", "Info"), + LIGHTING_PROPOGATE_SELECTION("&7Lighting has been propogated in %s0 chunks. (Note: To remove light use //removelight)", "Info"), UPDATED_LIGHTING_SELECTION("&7Lighting has been updated in %s0 chunks. (It may take a second for the packets to send)", "Info"), SET_REGION("&7Selection set to your current WorldEdit region", "Info"), WORLDEDIT_COMMAND_LIMIT("&7Please wait until your current action completes", "Info"), diff --git a/core/src/main/java/com/sk89q/worldedit/command/RegionCommands.java b/core/src/main/java/com/sk89q/worldedit/command/RegionCommands.java index c99c35ec..c23ec5a0 100644 --- a/core/src/main/java/com/sk89q/worldedit/command/RegionCommands.java +++ b/core/src/main/java/com/sk89q/worldedit/command/RegionCommands.java @@ -110,7 +110,7 @@ public class RegionCommands { selection = new CuboidRegion(new Vector(cx - 8, 0, cz - 8).multiply(16), new Vector(cx + 8, 0, cz + 8).multiply(16)); } int count = FaweAPI.fixLighting(loc.world, selection, FaweQueue.RelightMode.ALL); - BBC.FIX_LIGHTING_SELECTION.send(fp, count); + BBC.LIGHTING_PROPOGATE_SELECTION.send(fp, count); } @Command( @@ -161,7 +161,7 @@ public class RegionCommands { final int cz = loc.z >> 4; final NMSMappedFaweQueue queue = (NMSMappedFaweQueue) SetQueue.IMP.getNewQueue(fp.getWorld(), true, false); for (Vector pt : region) { - queue.setBlockLight((byte) pt.x, (byte) pt.y, (byte) pt.z, value); + queue.setBlockLight((int) pt.x, (int) pt.y, (int) pt.z, value); } int count = 0; for (Vector2D chunk : region.getChunks()) { @@ -185,7 +185,7 @@ public class RegionCommands { final int cz = loc.z >> 4; final NMSMappedFaweQueue queue = (NMSMappedFaweQueue) SetQueue.IMP.getNewQueue(fp.getWorld(), true, false); for (Vector pt : region) { - queue.setSkyLight((byte) pt.x, (byte) pt.y, (byte) pt.z, value); + queue.setSkyLight((int) pt.x, (int) pt.y, (int) pt.z, value); } int count = 0; for (Vector2D chunk : region.getChunks()) {