diff options
Diffstat (limited to 'patch-remap/og/net/minecraft/network/protocol/game/PacketPlayOutMultiBlockChange.patch')
-rw-r--r-- | patch-remap/og/net/minecraft/network/protocol/game/PacketPlayOutMultiBlockChange.patch | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/patch-remap/og/net/minecraft/network/protocol/game/PacketPlayOutMultiBlockChange.patch b/patch-remap/og/net/minecraft/network/protocol/game/PacketPlayOutMultiBlockChange.patch new file mode 100644 index 0000000000..06f07964d1 --- /dev/null +++ b/patch-remap/og/net/minecraft/network/protocol/game/PacketPlayOutMultiBlockChange.patch @@ -0,0 +1,23 @@ +--- a/net/minecraft/network/protocol/game/PacketPlayOutMultiBlockChange.java ++++ b/net/minecraft/network/protocol/game/PacketPlayOutMultiBlockChange.java +@@ -30,11 +30,19 @@ + 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) { ++ this.sectionPos = sectionposition; ++ this.positions = shortset.toShortArray(); ++ this.states = states; ++ } ++ // CraftBukkit end ++ + public PacketPlayOutMultiBlockChange(PacketDataSerializer packetdataserializer) { + this.sectionPos = SectionPosition.of(packetdataserializer.readLong()); + int i = packetdataserializer.readVarInt(); |