Fix setlight and setskylight commands

Fixes #314
This commit is contained in:
Jesse Boyd 2016-11-28 14:48:09 +11:00
parent 5b0ce58f6b
commit 8122c9d415
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F
2 changed files with 4 additions and 4 deletions

View File

@ -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"),

View File

@ -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()) {