mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-22 17:07:34 +01:00
20 lines
1.3 KiB
Diff
20 lines
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
|
|
|
|
no longer needed as the accessor to get chunksection handles null chunk sections
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
|
index 1f67c9c5f7161ea687983e7ae0ec7d259da9acd3..32bcc55ce15d832e2182d89acecd715947b1667d 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
|
@@ -315,6 +315,7 @@ public class ChunkHolder {
|
|
this.a(world, blockposition, iblockdata);
|
|
} else {
|
|
LevelChunkSection chunksection = chunk.getSections()[j];
|
|
+ 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);
|