mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Fix for EntityEffect packet
This commit is contained in:
parent
db17babe58
commit
dfc310b3f2
1 changed files with 5 additions and 2 deletions
|
|
@ -1339,7 +1339,9 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
{
|
||||
int entityid = dataTypes.ReadNextVarInt(packetData);
|
||||
Inventory.Effects effect = Effects.Speed;
|
||||
if (Enum.TryParse(dataTypes.ReadNextByte(packetData).ToString(), out effect))
|
||||
int effectId = protocolVersion >= MC_1_18_2_Version ?
|
||||
dataTypes.ReadNextVarInt(packetData) : dataTypes.ReadNextByte(packetData);
|
||||
if (Enum.TryParse(effectId.ToString(), out effect))
|
||||
{
|
||||
int amplifier = dataTypes.ReadNextByte(packetData);
|
||||
int duration = dataTypes.ReadNextVarInt(packetData);
|
||||
|
|
@ -1351,6 +1353,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
if (protocolVersion >= MC_1_19_Version)
|
||||
{
|
||||
hasFactorData = dataTypes.ReadNextBool(packetData);
|
||||
if (hasFactorData)
|
||||
factorCodec = dataTypes.ReadNextNbt(packetData);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue