Paper/Spigot-Server-Patches/0543-Don-t-mark-null-chunk-sections-for-block-updates.patch
Daniel Ennis e792da723a
Updated Upstream (Bukkit/CraftBukkit/Spigot) (#4728)
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:
30885166 Update to Minecraft 1.16.4

CraftBukkit Changes:
3af81c71 Update to Minecraft 1.16.4

Spigot Changes:
f011ca24 Update to Minecraft 1.16.4

Co-authored-by: Mariell Hoversholm <proximyst@proximyst.com>
2020-11-02 20:22:15 -06:00

19 lines
1.2 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/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
index 8146d88a90a758760e383985170d580372577615..c69b5a2c7b8061a65b2d5bb7ceb3ffe39dc36b8c 100644
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
@@ -420,6 +420,7 @@ public class PlayerChunk {
this.a(world, blockposition, iblockdata);
} else {
ChunkSection chunksection = chunk.getSections()[sectionposition.getY()];
+ if (chunksection == null) chunksection = new ChunkSection(sectionposition.getY(), chunk, world, true); // Paper - make a new chunk section if none was found
PacketPlayOutMultiBlockChange packetplayoutmultiblockchange = new PacketPlayOutMultiBlockChange(sectionposition, shortset, chunksection, this.x);
this.a(packetplayoutmultiblockchange, false);