Paper/Remapped-Spigot-Server-Patches/0540-Don-t-mark-null-chunk-sections-for-block-updates.patch
2021-06-11 13:56:17 +02:00

19 Zeilen
1.3 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Mariell Hoversholm <proximyst@proximyst.com>
Date: Fri, 14 Aug 2020 23:41:19 +0200
Subject: [PATCH] Don't mark null chunk sections for block updates
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
index 9e3629884709126574a52ad44fe7523f01dbcce9..82205ad13ef0e987bd83979d06331545efe0a60a 100644
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
@@ -449,6 +449,7 @@ public class ChunkHolder {
this.broadcastBlockEntityIfNeeded(world, blockposition, iblockdata);
} else {
LevelChunkSection chunksection = chunk.getSections()[sectionposition.getY()];
+ if (chunksection == null) chunksection = new LevelChunkSection(sectionposition.getY(), chunk, world, true); // Paper - make a new chunk section if none was found
ClientboundSectionBlocksUpdatePacket packetplayoutmultiblockchange = new ClientboundSectionBlocksUpdatePacket(sectionposition, shortset, chunksection, this.resendLight);
this.broadcast(packetplayoutmultiblockchange, false);