Add config to disable light recalculation optimizations

I really don't know how this could break things with light, but wanted to
let it be an option so we can try turning it off to fix some light bug reports
This commit is contained in:
Aikar
2019-03-02 16:22:01 -05:00
parent a684cde66b
commit 40e666b44a
3 changed files with 30 additions and 14 deletions

View File

@@ -1,4 +1,4 @@
From da8c71b49ad62be5a61d3bcfdd585d790dcff2eb Mon Sep 17 00:00:00 2001
From de0ef1fcdb2fa88d099d52b7cfb4d4cc56fb0690 Mon Sep 17 00:00:00 2001
From: theosib <millerti@172.16.221.1>
Date: Thu, 27 Sep 2018 01:43:35 -0600
Subject: [PATCH] Optimize redstone algorithm
@@ -19,10 +19,10 @@ Aside from making the obvious class/function renames and obfhelpers I didn't nee
Just added Bukkit's event system and took a few liberties with dead code and comment misspellings.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 2add466ac..b499c58b7 100644
index 8210b22ebe..f259c4e514 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -579,4 +579,14 @@ public class PaperWorldConfig {
@@ -584,4 +584,14 @@ public class PaperWorldConfig {
private void preventMovingIntoUnloadedChunks() {
preventMovingIntoUnloadedChunks = getBoolean("prevent-moving-into-unloaded-chunks", false);
}
@@ -39,7 +39,7 @@ index 2add466ac..b499c58b7 100644
}
diff --git a/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java b/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java
new file mode 100644
index 000000000..21d9d6d7e
index 0000000000..21d9d6d7ed
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java
@@ -0,0 +1,910 @@
@@ -954,7 +954,7 @@ index 000000000..21d9d6d7e
+ }
+}
diff --git a/src/main/java/net/minecraft/server/BlockRedstoneWire.java b/src/main/java/net/minecraft/server/BlockRedstoneWire.java
index 48c79568f..a09aa6944 100644
index 48c79568fb..a09aa69444 100644
--- a/src/main/java/net/minecraft/server/BlockRedstoneWire.java
+++ b/src/main/java/net/minecraft/server/BlockRedstoneWire.java
@@ -1,5 +1,7 @@
@@ -1122,7 +1122,7 @@ index 48c79568f..a09aa6944 100644
iblockdata.a(world, blockposition, 0);
world.setAir(blockposition);
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 5a447f8ef..9338618f8 100644
index a21de9b3d5..2f12e35acb 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -648,6 +648,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc