fix: send dedicated attack packet on 26.1+
Some checks failed
Build MCC and Documents / determine-build (push) Has been cancelled
Build MCC and Documents / fetch-translations (push) Has been cancelled
Build MCC and Documents / create-tag (push) Has been cancelled
Build MCC and Documents / build (linux-arm) (push) Has been cancelled
Build MCC and Documents / build (linux-arm64) (push) Has been cancelled
Build MCC and Documents / build (linux-x64) (push) Has been cancelled
Build MCC and Documents / build (osx-arm64) (push) Has been cancelled
Build MCC and Documents / build (osx-x64) (push) Has been cancelled
Build MCC and Documents / build (win-arm64) (push) Has been cancelled
Build MCC and Documents / build (win-x64) (push) Has been cancelled
Build MCC and Documents / build (win-x86) (push) Has been cancelled
Build MCC and Documents / create-release (push) Has been cancelled

fix: send dedicated attack packet on 26.1+
This commit is contained in:
Anon 2026-08-11 19:02:13 +02:00 committed by GitHub
commit d50e90d860
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -5721,6 +5721,13 @@ namespace MinecraftClient.Protocol.Handlers
{
List<byte> fields = new();
fields.AddRange(DataTypes.GetVarInt(EntityID));
if (protocolVersion >= MC_26_1_Version && type == (int)InteractType.Attack)
{
SendPacket(PacketTypesOut.Attack, fields);
return true;
}
fields.AddRange(DataTypes.GetVarInt(type));
// Is player Sneaking (Only 1.16 and above)