aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-spigotflower-stripped/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/mache-spigotflower-stripped/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java.patch')
-rw-r--r--patch-remap/mache-spigotflower-stripped/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower-stripped/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java.patch b/patch-remap/mache-spigotflower-stripped/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java.patch
new file mode 100644
index 0000000000..0f91165711
--- /dev/null
+++ b/patch-remap/mache-spigotflower-stripped/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java.patch
@@ -0,0 +1,25 @@
+--- a/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java
++++ b/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java
+@@ -30,14 +30,18 @@
+ short short0 = (Short) shortiterator.next();
+
+ this.positions[j] = short0;
+- this.states[j] = levelchunksection.getBlockState(SectionPos.sectionRelativeX(short0), SectionPos.sectionRelativeY(short0), SectionPos.sectionRelativeZ(short0));
++ this.states[j] = (section != null) ? section.getBlockState(SectionPos.sectionRelativeX(short0), SectionPos.sectionRelativeY(short0), SectionPos.sectionRelativeZ(short0)) : net.minecraft.world.level.block.Blocks.AIR.defaultBlockState(); // CraftBukkit - SPIGOT-6076, Mojang bug when empty chunk section notified
+ }
+
+ }
+
+- public ClientboundSectionBlocksUpdatePacket(FriendlyByteBuf friendlybytebuf) {
+- this.sectionPos = SectionPos.of(friendlybytebuf.readLong());
+- int i = friendlybytebuf.readVarInt();
++ // CraftBukkit start - Add constructor
++ public ClientboundSectionBlocksUpdatePacket(SectionPos sectionposition, ShortSet shortset, IBlockData[] states) {
++ this.sectionPos = sectionposition;
++ this.positions = shortset.toShortArray();
++ this.states = states;
++ }
++ // CraftBukkit end
+
+ this.positions = new short[i];
+ this.states = new BlockState[i];