From cffc14631b95913ddacbb52c6e561afb3a1310f7 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Fri, 16 Jun 2023 10:24:51 -0700 Subject: [PATCH] Make sure to post process chunks before they are sent to players Some TEs need to be post processed after generation to be sent properly (chests) --- patches/server/Rewrite-chunk-system.patch | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/patches/server/Rewrite-chunk-system.patch b/patches/server/Rewrite-chunk-system.patch index a487a0a95a..6fd9a1817c 100644 --- a/patches/server/Rewrite-chunk-system.patch +++ b/patches/server/Rewrite-chunk-system.patch @@ -3170,6 +3170,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // the target chunk may not be owned by this region, but this should be resolved in the future + break; + } ++ if (!chunk.isPostProcessingDone) { ++ // not yet post-processed, need to do this so that tile entities can properly be sent to clients ++ chunk.postProcessGeneration(); ++ // check if there was any recursive action ++ if (this.removed || this.sendQueue.isEmpty() || this.sendQueue.firstLong() != pendingSend) { ++ return; ++ } // else: good to dequeue and send, fall through ++ } + this.sendQueue.dequeueLong(); + + this.sendChunk(pendingSendX, pendingSendZ);