mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-19 14:59:32 +00:00
--------- Co-authored-by: MC_XiaoHei <xiaohei.xor7studio@foxmail.com> Co-authored-by: Bluemangoo <chenfy2006@qq.com>
20 lines
1.1 KiB
Diff
20 lines
1.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: violetc <58360096+s-yh-china@users.noreply.github.com>
|
|
Date: Mon, 20 May 2024 17:15:18 +0800
|
|
Subject: [PATCH] Dev Fix
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/network/protocol/common/custom/CustomPacketPayload.java b/src/main/java/net/minecraft/network/protocol/common/custom/CustomPacketPayload.java
|
|
index bc885d2cc95572ec68f1df62555fdba7998b1d93..0211311b3b63bcdea7ebf7bcb24629674c771402 100644
|
|
--- a/src/main/java/net/minecraft/network/protocol/common/custom/CustomPacketPayload.java
|
|
+++ b/src/main/java/net/minecraft/network/protocol/common/custom/CustomPacketPayload.java
|
|
@@ -34,7 +34,7 @@ public interface CustomPacketPayload {
|
|
|
|
private <T extends CustomPacketPayload> void writeCap(B value, CustomPacketPayload.Type<T> id, CustomPacketPayload payload) {
|
|
value.writeResourceLocation(id.id());
|
|
- StreamCodec<B, T> streamCodec = this.findCodec(id.id);
|
|
+ StreamCodec<B, T> streamCodec = (StreamCodec<B, T>) this.findCodec(id.id); // Leaves - dev fix
|
|
streamCodec.encode(value, (T)payload);
|
|
}
|
|
|