From 7879320af0e67a4ebda09ed17a93246af10830dd Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Sun, 16 Aug 2020 18:07:42 +1000 Subject: [PATCH] SPIGOT-6076: Crash when updating blocks in uninitialized chunk sections By: md_5 --- .../nms-patches/PacketPlayOutMultiBlockChange.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 paper-server/nms-patches/PacketPlayOutMultiBlockChange.patch diff --git a/paper-server/nms-patches/PacketPlayOutMultiBlockChange.patch b/paper-server/nms-patches/PacketPlayOutMultiBlockChange.patch new file mode 100644 index 0000000000..01fa23df84 --- /dev/null +++ b/paper-server/nms-patches/PacketPlayOutMultiBlockChange.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/server/PacketPlayOutMultiBlockChange.java ++++ b/net/minecraft/server/PacketPlayOutMultiBlockChange.java +@@ -24,7 +24,7 @@ + short short0 = (Short) shortiterator.next(); + + this.b[i] = short0; +- this.c[i] = chunksection.getType(SectionPosition.a(short0), SectionPosition.b(short0), SectionPosition.c(short0)); ++ this.c[i] = (chunksection != null) ? chunksection.getType(SectionPosition.a(short0), SectionPosition.b(short0), SectionPosition.c(short0)) : Blocks.AIR.getBlockData(); // CraftBukkit - SPIGOT-6076, Mojang bug when empty chunk section notified + } + + }