9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-29 03:49:21 +00:00

[ci skip] cleanup (8/14)

This commit is contained in:
Dreeam
2025-03-12 16:08:10 -04:00
parent 0e817b0378
commit 84d71fb533
3 changed files with 13 additions and 30 deletions

View File

@@ -5,19 +5,9 @@ Subject: [PATCH] Rewrite ClientboundLightUpdatePacketData
diff --git a/net/minecraft/network/protocol/game/ClientboundLightUpdatePacketData.java b/net/minecraft/network/protocol/game/ClientboundLightUpdatePacketData.java
index a0b54f3a3d11e0f0f1cb806406a870ba36da8f07..2ef45811f3a3a763f389e8e6e9eeaf255cf668e6 100644
index a0b54f3a3d11e0f0f1cb806406a870ba36da8f07..304365f61d6fde632c1c09cb889d466ee70aa518 100644
--- a/net/minecraft/network/protocol/game/ClientboundLightUpdatePacketData.java
+++ b/net/minecraft/network/protocol/game/ClientboundLightUpdatePacketData.java
@@ -1,8 +1,8 @@
package net.minecraft.network.protocol.game;
-import com.google.common.collect.Lists;
import io.netty.buffer.ByteBuf;
import java.util.BitSet;
+import java.util.Arrays;
import java.util.List;
import javax.annotation.Nullable;
import net.minecraft.core.SectionPos;
@@ -16,30 +16,109 @@ import net.minecraft.world.level.lighting.LevelLightEngine;
public class ClientboundLightUpdatePacketData {
@@ -222,7 +212,7 @@ index a0b54f3a3d11e0f0f1cb806406a870ba36da8f07..2ef45811f3a3a763f389e8e6e9eeaf25
public List<byte[]> getSkyUpdates() {
- return this.skyUpdates;
+ return this.skyUpdateCount > 0 ? Arrays.asList(this.skyUpdates) : List.of();
+ return this.skyUpdateCount > 0 ? Arrays.asList(this.skyUpdates) : List.of(); // Leaf - Rewrite ClientboundLightUpdatePacketData
}
public BitSet getBlockYMask() {
@@ -231,6 +221,6 @@ index a0b54f3a3d11e0f0f1cb806406a870ba36da8f07..2ef45811f3a3a763f389e8e6e9eeaf25
public List<byte[]> getBlockUpdates() {
- return this.blockUpdates;
+ return this.blockUpdateCount > 0 ? Arrays.asList(this.blockUpdates) : List.of();
+ return this.blockUpdateCount > 0 ? Arrays.asList(this.blockUpdates) : List.of(); // Leaf - Rewrite ClientboundLightUpdatePacketData
}
}