mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-24 16:18:02 +01:00
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:
parent
676ba6206d
commit
df22839abf
1 changed files with 3 additions and 12 deletions
|
@ -1,4 +1,4 @@
|
|||
From 39fd972d4e2eb1a6ae58e4a8ca9203978ec102ec Mon Sep 17 00:00:00 2001
|
||||
From eca91170fffd8d7b1874f9e649323e3ab457b4a3 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Fri, 28 Sep 2018 20:46:29 -0400
|
||||
Subject: [PATCH] Optimize Light Recalculations
|
||||
|
@ -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
|
||||
@@ -445,7 +445,7 @@ 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();
|
||||
@@ -589,8 +589,9 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
}
|
||||
|
||||
|
@ -73,5 +64,5 @@ index bbcedb8fc7..a19e941174 100644
|
|||
// CraftBukkit end
|
||||
return false;
|
||||
--
|
||||
2.19.0
|
||||
2.19.1
|
||||
|
||||
|
|
Loading…
Reference in a new issue