From 09f1a196095aa6f221758e0675ccca6e3de72534 Mon Sep 17 00:00:00 2001 From: md_5 Date: Mon, 25 Jul 2016 19:04:06 +1000 Subject: [PATCH] Hook into World for light getters due to additional validation. --- src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java index 88818262cf..03addbd609 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java @@ -173,11 +173,11 @@ public class CraftBlock implements Block { } public byte getLightFromSky() { - return (byte) chunk.getHandle().getBrightness(EnumSkyBlock.SKY, new BlockPosition(this.x, this.y, this.z)); + return (byte) chunk.getHandle().getWorld().b(EnumSkyBlock.SKY, new BlockPosition(this.x, this.y, this.z)); // PAIL: rename } public byte getLightFromBlocks() { - return (byte) chunk.getHandle().getBrightness(EnumSkyBlock.BLOCK, new BlockPosition(this.x, this.y, this.z)); + return (byte) chunk.getHandle().getWorld().b(EnumSkyBlock.BLOCK, new BlockPosition(this.x, this.y, this.z)); // PAIL: rename }