From 88123f0569767a296dbd219895bd49a70fc7342d Mon Sep 17 00:00:00 2001 From: md_5 Date: Mon, 16 May 2016 16:37:22 +1000 Subject: [PATCH] SPIGOT-2286: Don't store CraftBlockState light level --- .../java/org/bukkit/craftbukkit/block/CraftBlockState.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java index 3261f24961..80ada02d37 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java @@ -30,7 +30,6 @@ public class CraftBlockState implements BlockState { protected int type; protected MaterialData data; protected int flag; - protected final byte light; public CraftBlockState(final Block block) { this.world = (CraftWorld) block.getWorld(); @@ -38,7 +37,6 @@ public class CraftBlockState implements BlockState { this.y = block.getY(); this.z = block.getZ(); this.type = block.getTypeId(); - this.light = block.getLightLevel(); this.chunk = (CraftChunk) block.getChunk(); this.flag = 3; @@ -53,7 +51,6 @@ public class CraftBlockState implements BlockState { public CraftBlockState(Material material) { world = null; type = material.getId(); - light = 0; chunk = null; x = y = z = 0; } @@ -137,7 +134,7 @@ public class CraftBlockState implements BlockState { } public byte getLightLevel() { - return light; + return getBlock().getLightLevel(); } public Block getBlock() {