mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-04 14:04:49 +01:00
a2ad49b22f
Note to other developers: This commit may require you to wipe your workspace as a result of the changes to BD. --- work/BuildData Submodule work/BuildData f527a8ff..d56672db: > Mappings Update --- work/Bukkit Submodule work/Bukkit 0c1d258bb..db06c80d7: > Add list of entities to EntityTransformEvent > SPIGOT-4347: Add API to allow storing arbitrary values on ItemStacks ---work/CraftBukkit Submodule work/CraftBukkit 6a398ac44..068dab5be: > Enable optional source JAR shading via profile shadeSourcesJar > Use ImmutableList rather than AbstractList for CraftMetaBook > Fix setRecipes(List) not setting Knowledge Book recipes. > Mappings Update > Add list of entities to EntityTransformEvent & move die calls > SPIGOT-4347: Add API to allow storing arbitrary values on ItemStacks > Add Vanilla help to default permissions --- work/Spigot Submodule work/Spigot a1f2566f6..e769fe4d9: > Mappings Update > Rebuild patches
66 lines
2.4 KiB
Diff
66 lines
2.4 KiB
Diff
From 9bd565eb9c7a00c05a056cdffc13286be4049e01 Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Sat, 29 Sep 2018 01:18:16 -0400
|
|
Subject: [PATCH] Fix Sending Chunks to Client
|
|
|
|
Vanilla has some screwy logic that doesn't send a chunk until
|
|
it has been post processed. This is an issue as post processing
|
|
doesn't occur until all neighbor chunks have been loaded.
|
|
|
|
This can reduce view distance while generating terrain, but also
|
|
cause bugs where chunks are never sent to the client.
|
|
|
|
This fix always sends chunks to the client, and simply updates
|
|
the client anytime post processing is triggered with the new chunk data.
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
|
index 07bc23e28..b9242d4a2 100644
|
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
|
@@ -1184,7 +1184,7 @@ public class Chunk implements IChunkAccess {
|
|
}
|
|
|
|
public boolean isReady() {
|
|
- return this.C.a(ChunkStatus.POSTPROCESSED);
|
|
+ return true; // Paper - Always send chunks
|
|
}
|
|
|
|
public boolean v() {
|
|
@@ -1422,6 +1422,13 @@ public class Chunk implements IChunkAccess {
|
|
this.h.clear();
|
|
this.a(ChunkStatus.POSTPROCESSED);
|
|
this.m.a(this);
|
|
+ // Paper start - resend chunk after post process
|
|
+ PlayerChunk playerChunk = ((WorldServer) world).getPlayerChunkMap().getChunk(locX, locZ);
|
|
+ if (playerChunk != null) {
|
|
+ playerChunk.done = false;
|
|
+ playerChunk.sendAll();
|
|
+ }
|
|
+ // Paper end
|
|
}
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
|
|
index cbff0d946..3ac09b91f 100644
|
|
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
|
|
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
|
|
@@ -23,7 +23,7 @@ public class PlayerChunk {
|
|
private int dirtyCount;
|
|
private int h;
|
|
private long i;
|
|
- private boolean done;
|
|
+ boolean done; // Paper - package-private
|
|
|
|
// CraftBukkit start - add fields
|
|
// You know the drill, https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse
|
|
@@ -155,6 +155,7 @@ public class PlayerChunk {
|
|
}
|
|
}
|
|
|
|
+ public boolean sendAll() { return b(); } // Paper - OBFHELPER
|
|
public boolean b() {
|
|
if (this.done) {
|
|
return true;
|
|
--
|
|
2.19.2
|
|
|