mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-04 22:14:40 +01:00
3496f2d7e4
Developers!: You will need to clean up your work/Minecraft/1.13.2 folder for this Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: b850a822 SPIGOT-4526: Add conversion time API for Zombie & subclasses CraftBukkit Changes:38cf676e
SPIGOT-4534: CreatureSpawnEvent not being called for CHUNK_GENb446cb5d
SPIGOT-4527: Fix sponges with waterlogged blocks6ec8ea5c
SPIGOT-4526: Add conversion time API for Zombie & subclassesc64fe508
Mappings Updatea3c2ec03
Fix missing ServerListPingEvent call for legacy pings Spigot Changes: 1dc156ce Rebuild patches 140f654d Mappings Update
66 lines
2.4 KiB
Diff
66 lines
2.4 KiB
Diff
From 201ce3d451f0e6fb3a7ee86019926e044b3f9512 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 aa7f01f19..e3d97757f 100644
|
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
|
@@ -1191,7 +1191,7 @@ public class Chunk implements IChunkAccess {
|
|
}
|
|
|
|
public boolean isReady() {
|
|
- return this.C.a(ChunkStatus.POSTPROCESSED);
|
|
+ return true; // Paper - Always send chunks
|
|
}
|
|
|
|
public boolean v() {
|
|
@@ -1429,6 +1429,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 e61538b3c..f5d971bbe 100644
|
|
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
|
|
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
|
|
@@ -18,7 +18,7 @@ public class PlayerChunk {
|
|
private int dirtyCount;
|
|
private int h;
|
|
private long i;
|
|
- private boolean done;
|
|
+ boolean done; // Paper - package-private
|
|
boolean chunkExists; // Paper
|
|
// Paper start
|
|
PaperAsyncChunkProvider.CancellableChunkRequest chunkRequest;
|
|
@@ -144,6 +144,7 @@ public class PlayerChunk {
|
|
}
|
|
}
|
|
|
|
+ public boolean sendAll() { return b(); } // Paper - OBFHELPER
|
|
public boolean b() {
|
|
if (this.done) {
|
|
return true;
|
|
--
|
|
2.20.0
|
|
|