aboutsummaryrefslogtreecommitdiffhomepage
path: root/Spigot-Server-Patches-Unmapped/0542-Don-t-mark-null-chunk-sections-for-block-updates.patch
diff options
context:
space:
mode:
Diffstat (limited to 'Spigot-Server-Patches-Unmapped/0542-Don-t-mark-null-chunk-sections-for-block-updates.patch')
-rw-r--r--Spigot-Server-Patches-Unmapped/0542-Don-t-mark-null-chunk-sections-for-block-updates.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/Spigot-Server-Patches-Unmapped/0542-Don-t-mark-null-chunk-sections-for-block-updates.patch b/Spigot-Server-Patches-Unmapped/0542-Don-t-mark-null-chunk-sections-for-block-updates.patch
new file mode 100644
index 0000000000..c694cf5898
--- /dev/null
+++ b/Spigot-Server-Patches-Unmapped/0542-Don-t-mark-null-chunk-sections-for-block-updates.patch
@@ -0,0 +1,18 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Mariell Hoversholm <[email protected]>
+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/PlayerChunk.java b/src/main/java/net/minecraft/server/level/PlayerChunk.java
+index d6a5a0b17308913a5efd97cd27fabd0825ef68c6..00cebd33101916f29bbc192d531ac0fba31e037b 100644
+--- a/src/main/java/net/minecraft/server/level/PlayerChunk.java
++++ b/src/main/java/net/minecraft/server/level/PlayerChunk.java
+@@ -450,6 +450,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);