Archiviert
13
0

Remove light optimization

getting lots of bug reports on light. just going to drop this even though
I really don't see how it could be the source due to my understanding of
the games light engine...

Fixes #1920
Dieser Commit ist enthalten in:
Aikar 2019-03-27 20:46:46 -04:00
Ursprung 8383c2b97c
Commit af52f138da
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 401ADFC9891FAAFE
4 geänderte Dateien mit 12 neuen und 44 gelöschten Zeilen

Datei anzeigen

@ -1,36 +1,13 @@
From 68e14a1e03878d225c0026275611d94a77947081 Mon Sep 17 00:00:00 2001
From 74a659caa33a7279b1be97385ce24e7e55082a65 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
The server triggers light recalculations even if the new block
is the same as the old block. At this time, BlockData Properties
do not impact light calculations.
So the only way light should change, is if the block itself
changes from 1 block to another.
Also optimizes to not repeatedly look up the same chunk for
Optimizes to not repeatedly look up the same chunk for
light lookups.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index e04204055..0b54b7d78 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -523,6 +523,11 @@ public class PaperWorldConfig {
log("ArmorStand ticking is " + (this.armorStandTick ? "enabled" : "disabled") + " by default");
}
+ public boolean optimizeLight = true;
+ private void optimizeLight() {
+ this.optimizeLight = getBoolean("optimize-light", optimizeLight);
+ }
+
public boolean antiXray;
public boolean asynchronous;
public EngineMode engineMode;
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index fb00e7a9c..fdf062b8b 100644
index fb00e7a9c..fabfc315c 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -353,7 +353,7 @@ public class Chunk implements IChunkAccess {
@ -42,15 +19,6 @@ index fb00e7a9c..fdf062b8b 100644
}
this.x = true;
@@ -563,7 +563,7 @@ public class Chunk implements IChunkAccess {
} else {
if (flag1) {
this.initLighting();
- } else {
+ } else if (!world.paperConfig.optimizeLight || block != block1) { // Paper - Optimize light recalculations
this.runOrQueueLightUpdate(() -> { // Paper - Queue light update
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 739fbecac..739448d8b 100644
--- a/src/main/java/net/minecraft/server/World.java

Datei anzeigen

@ -1,4 +1,4 @@
From a934c12a69f5fe8a16185e217602893fe736bc7d Mon Sep 17 00:00:00 2001
From 03c3c45382dd0a1fc06143cb5bd31f0e0722d6a1 Mon Sep 17 00:00:00 2001
From: Gabriele C <sgdc3.mail@gmail.com>
Date: Mon, 22 Oct 2018 17:34:10 +0200
Subject: [PATCH] Add option to prevent players from moving into unloaded
@ -6,10 +6,10 @@ Subject: [PATCH] Add option to prevent players from moving into unloaded
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index d723868fc..8210b22eb 100644
index 30985cdfc..2add466ac 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -579,4 +579,9 @@ public class PaperWorldConfig {
@@ -574,4 +574,9 @@ public class PaperWorldConfig {
replacementBlocks = getList("anti-xray.replacement-blocks", Arrays.asList("stone", "planks"));
log("Anti-Xray: " + (antiXray ? "enabled" : "disabled") + " / Engine Mode: " + engineMode.getDescription() + " / Chunk Edge Mode: " + chunkEdgeMode.getDescription() + " / Up to " + ((maxChunkSectionIndex + 1) * 16) + " blocks / Update Radius: " + updateRadius);
}

Datei anzeigen

@ -1,4 +1,4 @@
From 9392c69898ef0bcbd528eedb4588c9d1d64675a3 Mon Sep 17 00:00:00 2001
From 18012a69f5b8fb4eac4d7fb7e868eddba581a77b 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 8210b22eb..f259c4e51 100644
index 2add466ac..b499c58b7 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -584,4 +584,14 @@ public class PaperWorldConfig {
@@ -579,4 +579,14 @@ public class PaperWorldConfig {
private void preventMovingIntoUnloadedChunks() {
preventMovingIntoUnloadedChunks = getBoolean("prevent-moving-into-unloaded-chunks", false);
}

Datei anzeigen

@ -1,4 +1,4 @@
From 01abbf425677bc6dbfe5159b84545fb3bbd1a036 Mon Sep 17 00:00:00 2001
From 9e85ab2027dac98fc5f8252b955be863a7cb64f3 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 24 Mar 2019 01:01:32 -0400
Subject: [PATCH] Only count Natural Spawned mobs towards natural spawn mob
@ -17,10 +17,10 @@ This should fully solve all of the issues around it so that only natural
influences natural spawns.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index f259c4e51..fa1d88aa8 100644
index b499c58b7..fc7ac2bc0 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -594,4 +594,14 @@ public class PaperWorldConfig {
@@ -589,4 +589,14 @@ public class PaperWorldConfig {
log("Using vanilla redstone algorithm.");
}
}