3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 12:30:06 +01:00
Paper/Spigot-Server-Patches/0244-Revert-Fix-some-chunks-not-being-sent-to-the-client.patch
Shane Freeder a6f9074647
Remove lighting patches from spigot that cause more harm than good.
This commit removes two patches from spigot:
please review the patch messages for more information, however;

"Allow Disabling of Random Lighting Updates" potentially leaves chunk light maps in an invalid state, with
how often the server looks at these anyways, this patch really serves a questionable nature, the work is
going to be done, only it's being delayed and allowing the light map to be left in a potentially outdated
state.

"Fix some chunks not being sent to the client" sends chunks before their lighting has been calculated, this
means that the client will recieve chunks before they lighting has been calculated which can cause rendering
artifacts. The original issue around this patch appears to have already been fixed years ago.
2017-10-10 23:27:47 +01:00

39 Zeilen
1.8 KiB
Diff

From 53b4f29fa7c90a534b8eed0c7e5819d81eaae968 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Wed, 4 Oct 2017 04:20:21 +0100
Subject: [PATCH] Revert "Fix some chunks not being sent to the client"
This patch actually allows chunks to be sent before lighting has been calculated in a chunk,
causing lighting to be invalid on chunks sent to clients. as lighting is done during chunk
population and the server tracks which chunks have been sent to the client, this is no longer
an issue.
as the server tracks what chunks have and haven't been sent to the client (and the original
issue for this appears to have already been fixed in the server in 1.9), there is nothing
that this patch is actually achieving as of now.
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index d6e6f4d3e..faa52c933 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -1128,15 +1128,7 @@ public class Chunk {
}
public boolean isReady() {
- // Spigot Start
- /*
- * As of 1.7, Mojang added a check to make sure that only chunks which have been lit are sent to the client.
- * Unfortunately this interferes with our modified chunk ticking algorithm, which will only tick chunks distant from the player on a very infrequent basis.
- * We cannot unfortunately do this lighting stage during chunk gen as it appears to put a lot more noticeable load on the server, than when it is done at play time.
- * For now at least we will simply send all chunks, in accordance with pre 1.7 behaviour.
- */
- return true;
- // Spigot End
+ return this.r && this.done && this.lit;
}
public boolean j() {
--
2.14.2