From 859347b4d56e0ea5ccff4d85c6463e402d76fb84 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 8 Oct 2018 20:27:13 -0400 Subject: [PATCH] Fix Light Bugs - Fixes #1542 Applied a "Only run this when the blocks are different" to a place, that apparently must be called even with the same block but different other data I guess. This was causing oddness with light data. --- .../Optimize-Light-Recalculations.patch | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/Spigot-Server-Patches/Optimize-Light-Recalculations.patch b/Spigot-Server-Patches/Optimize-Light-Recalculations.patch index 795c8832d..3efbe6d51 100644 --- a/Spigot-Server-Patches/Optimize-Light-Recalculations.patch +++ b/Spigot-Server-Patches/Optimize-Light-Recalculations.patch @@ -36,18 +36,9 @@ index cb99888707..027f98633e 100644 int i1 = iblockdata.b(this.world, blockposition); int j1 = iblockdata1.b(this.world, blockposition); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index bbcedb8fc7..a19e941174 100644 +index bbcedb8fc7..540d237ceb 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc - } else { - IBlockData iblockdata2 = this.getType(blockposition); - -- if (iblockdata2.b(this, blockposition) != iblockdata1.b(this, blockposition) || iblockdata2.e() != iblockdata1.e()) { -+ if (iblockdata.getBlock() != iblockdata2.getBlock() && iblockdata2.b(this, blockposition) != iblockdata1.b(this, blockposition) || iblockdata2.e() != iblockdata1.e()) { // Paper - optimize light recalculations - this.methodProfiler.a("checkLight"); - chunk.runOrQueueLightUpdate(() -> this.r(blockposition)); // Paper - Queue light update - this.methodProfiler.e(); @@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc }