mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 12:02:36 +01:00
b42b04fecd
By: Parker Hawke <hawkeboyz2@hotmail.com>
24 lines
1.4 KiB
Diff
24 lines
1.4 KiB
Diff
--- a/net/minecraft/network/protocol/game/PacketPlayOutMultiBlockChange.java
|
|
+++ b/net/minecraft/network/protocol/game/PacketPlayOutMultiBlockChange.java
|
|
@@ -32,11 +32,20 @@
|
|
short short0 = (Short) shortiterator.next();
|
|
|
|
this.positions[j] = short0;
|
|
- this.states[j] = chunksection.getBlockState(SectionPosition.sectionRelativeX(short0), SectionPosition.sectionRelativeY(short0), SectionPosition.sectionRelativeZ(short0));
|
|
+ this.states[j] = (chunksection != null) ? chunksection.getBlockState(SectionPosition.sectionRelativeX(short0), SectionPosition.sectionRelativeY(short0), SectionPosition.sectionRelativeZ(short0)) : net.minecraft.world.level.block.Blocks.AIR.defaultBlockState(); // CraftBukkit - SPIGOT-6076, Mojang bug when empty chunk section notified
|
|
}
|
|
|
|
}
|
|
|
|
+ // CraftBukkit start - Add constructor
|
|
+ public PacketPlayOutMultiBlockChange(SectionPosition sectionposition, ShortSet shortset, IBlockData[] states, boolean flag) {
|
|
+ this.sectionPos = sectionposition;
|
|
+ this.suppressLightUpdates = flag;
|
|
+ this.positions = shortset.toShortArray();
|
|
+ this.states = states;
|
|
+ }
|
|
+ // CraftBukkit end
|
|
+
|
|
public PacketPlayOutMultiBlockChange(PacketDataSerializer packetdataserializer) {
|
|
this.sectionPos = SectionPosition.of(packetdataserializer.readLong());
|
|
this.suppressLightUpdates = packetdataserializer.readBoolean();
|