mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-23 01:17:44 +01:00
SPIGOT-6076: Crash when updating blocks in uninitialized chunk sections
This commit is contained in:
parent
5a66916c08
commit
e354566ec1
11
nms-patches/PacketPlayOutMultiBlockChange.patch
Normal file
11
nms-patches/PacketPlayOutMultiBlockChange.patch
Normal file
@ -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
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user