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.
This commit is contained in:
Aikar 2018-10-08 20:27:13 -04:00
parent 9857d5a9b4
commit 859347b4d5

View file

@ -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
}