mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Fix interact entity not being correctly implemented 1.16+
This commit is contained in:
parent
d3ea597dd1
commit
0c3f774c07
1 changed files with 11 additions and 1 deletions
|
|
@ -1595,6 +1595,11 @@ namespace MinecraftClient.Protocol.Handlers
|
||||||
fields.AddRange(dataTypes.GetFloat(Y));
|
fields.AddRange(dataTypes.GetFloat(Y));
|
||||||
fields.AddRange(dataTypes.GetFloat(Z));
|
fields.AddRange(dataTypes.GetFloat(Z));
|
||||||
fields.AddRange(dataTypes.GetVarInt(hand));
|
fields.AddRange(dataTypes.GetVarInt(hand));
|
||||||
|
// Is player Sneaking (Only 1.16 and above)
|
||||||
|
// Currently hardcoded to false
|
||||||
|
// TODO: Update to reflect the real player state
|
||||||
|
if (protocolversion >= MC116Version)
|
||||||
|
fields.AddRange(dataTypes.GetBool(false));
|
||||||
SendPacket(PacketTypesOut.InteractEntity, fields);
|
SendPacket(PacketTypesOut.InteractEntity, fields);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -1610,6 +1615,11 @@ namespace MinecraftClient.Protocol.Handlers
|
||||||
fields.AddRange(dataTypes.GetVarInt(EntityID));
|
fields.AddRange(dataTypes.GetVarInt(EntityID));
|
||||||
fields.AddRange(dataTypes.GetVarInt(type));
|
fields.AddRange(dataTypes.GetVarInt(type));
|
||||||
fields.AddRange(dataTypes.GetVarInt(hand));
|
fields.AddRange(dataTypes.GetVarInt(hand));
|
||||||
|
// Is player Sneaking (Only 1.16 and above)
|
||||||
|
// Currently hardcoded to false
|
||||||
|
// TODO: Update to reflect the real player state
|
||||||
|
if (protocolversion >= MC116Version)
|
||||||
|
fields.AddRange(dataTypes.GetBool(false));
|
||||||
SendPacket(PacketTypesOut.InteractEntity, fields);
|
SendPacket(PacketTypesOut.InteractEntity, fields);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue