From 5de72de234a32262398e75c19e4e4c7b3888b0c9 Mon Sep 17 00:00:00 2001 From: Anon Date: Mon, 30 Mar 2026 21:37:53 +0200 Subject: [PATCH] Fixed a wrong effect decoding on 1.20.4 --- MinecraftClient/Protocol/Handlers/Protocol18.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MinecraftClient/Protocol/Handlers/Protocol18.cs b/MinecraftClient/Protocol/Handlers/Protocol18.cs index eeabc8e0..8fd192a7 100644 --- a/MinecraftClient/Protocol/Handlers/Protocol18.cs +++ b/MinecraftClient/Protocol/Handlers/Protocol18.cs @@ -2514,7 +2514,7 @@ namespace MinecraftClient.Protocol.Handlers if (handler.GetEntityHandlingEnabled()) { var entityId = dataTypes.ReadNextVarInt(packetData); - var effectId = protocolVersion >= MC_1_18_2_Version + var effectId = protocolVersion >= MC_1_20_4_Version ? dataTypes.ReadNextVarInt(packetData) + 1 : dataTypes.ReadNextByte(packetData); @@ -2544,7 +2544,7 @@ namespace MinecraftClient.Protocol.Handlers if (handler.GetEntityHandlingEnabled()) { var entityId = dataTypes.ReadNextVarInt(packetData); - var effectId = protocolVersion >= MC_1_18_2_Version + var effectId = protocolVersion >= MC_1_20_4_Version ? dataTypes.ReadNextVarInt(packetData) + 1 : dataTypes.ReadNextByte(packetData);