diff --git a/patches/server/0034-Chat-Image-protocol.patch b/patches/server/0034-Chat-Image-protocol.patch index 9ee31776..a77df7b4 100644 --- a/patches/server/0034-Chat-Image-protocol.patch +++ b/patches/server/0034-Chat-Image-protocol.patch @@ -6,14 +6,14 @@ Subject: [PATCH] Chat Image protocol This patch is Powered by ChatImage (https://github.com/kitUIN/ChatImage) diff --git a/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java b/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java -index be8474a514e7b9bdacd7cc89d8d3e8b3bc3eb709..759b8728f954c2b2725ac2b3f5ffeb495160c7ca 100644 +index be8474a514e7b9bdacd7cc89d8d3e8b3bc3eb709..9324ca1f1abd2343b2f1eaec019e84428f01c626 100644 --- a/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java +++ b/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java @@ -21,6 +21,9 @@ public class ProtocolSupport implements IConfigModule { @ConfigInfo(baseName = "appleskin-protocol") public static boolean appleskinProtocol = false; -+ @ConfigInfo(baseName = "chatImage-protocol") ++ @ConfigInfo(baseName = "chatimage-protocol") + public static boolean chatImageProtocol = false; + @ConfigInfo(baseName = "xaero-map-protocol") @@ -21,10 +21,10 @@ index be8474a514e7b9bdacd7cc89d8d3e8b3bc3eb709..759b8728f954c2b2725ac2b3f5ffeb49 @ConfigInfo(baseName = "xaero-map-server-id") diff --git a/src/main/java/org/leavesmc/leaves/protocol/ChatImageProtocol.java b/src/main/java/org/leavesmc/leaves/protocol/ChatImageProtocol.java new file mode 100644 -index 0000000000000000000000000000000000000000..cfbcc4fd836547e6019bc1bc0ac7a3263f0c385a +index 0000000000000000000000000000000000000000..1b829e73e2e000219fb4b44f78ec3f6a1c2824c7 --- /dev/null +++ b/src/main/java/org/leavesmc/leaves/protocol/ChatImageProtocol.java -@@ -0,0 +1,157 @@ +@@ -0,0 +1,160 @@ +package org.leavesmc.leaves.protocol; + +import com.google.common.collect.Lists; @@ -60,6 +60,7 @@ index 0000000000000000000000000000000000000000..cfbcc4fd836547e6019bc1bc0ac7a326 + public record FileInfoChannelPacket(String message) implements LeavesCustomPayload { + private static final ResourceLocation FILE_INFO = ChatImageProtocol.id("file_info"); + ++ @New + public FileInfoChannelPacket(ResourceLocation id, FriendlyByteBuf buffer) { + this(buffer.readUtf(MAX_STRING)); + } @@ -81,6 +82,7 @@ index 0000000000000000000000000000000000000000..cfbcc4fd836547e6019bc1bc0ac7a326 + */ + private static final ResourceLocation DOWNLOAD_FILE_CHANNEL = ChatImageProtocol.id("download_file_channel"); + ++ @New + public DownloadFileChannelPacket(ResourceLocation id, FriendlyByteBuf buffer) { + this(buffer.readUtf(MAX_STRING)); + } @@ -103,6 +105,7 @@ index 0000000000000000000000000000000000000000..cfbcc4fd836547e6019bc1bc0ac7a326 + */ + private static final ResourceLocation FILE_CHANNEL = ChatImageProtocol.id("file_channel"); + ++ @New + public FileChannelPacket(ResourceLocation id, FriendlyByteBuf buffer) { + this(buffer.readUtf(MAX_STRING)); + } diff --git a/patches/server/0035-Asteor-Bar-protocol.patch b/patches/server/0035-Asteor-Bar-protocol.patch index fae0dbea..7fbf1c29 100644 --- a/patches/server/0035-Asteor-Bar-protocol.patch +++ b/patches/server/0035-Asteor-Bar-protocol.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Asteor Bar protocol This patch is Powered by AsteorBar (https://github.com/afoxxvi/AsteorBarMod) diff --git a/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java b/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java -index 759b8728f954c2b2725ac2b3f5ffeb495160c7ca..8378bab717088b832888be69618f13ba6dd44273 100644 +index 9324ca1f1abd2343b2f1eaec019e84428f01c626..45c422b993e254fd892bfd6f47a074f1e9688714 100644 --- a/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java +++ b/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java @@ -21,6 +21,9 @@ public class ProtocolSupport implements IConfigModule { @@ -16,7 +16,7 @@ index 759b8728f954c2b2725ac2b3f5ffeb495160c7ca..8378bab717088b832888be69618f13ba + @ConfigInfo(baseName = "asteorbar-protocol") + public static boolean asteorBarProtocol = false; + - @ConfigInfo(baseName = "chatImage-protocol") + @ConfigInfo(baseName = "chatimage-protocol") public static boolean chatImageProtocol = false; diff --git a/src/main/java/org/leavesmc/leaves/protocol/AsteorBarProtocol.java b/src/main/java/org/leavesmc/leaves/protocol/AsteorBarProtocol.java