Skip to content

PacketProcessException: Failed to map Packet ID 2 during server list ping when InertiaAntiCheat is installed for 1.1.1.1 #83

@500x0

Description

@500x0

issue Summary:
InertiaAntiCheat 1.1.1.1 causes PacketProcessException errors when clients attempt to refresh the Minecraft server list (ping the server). This occurs because InertiaAntiCheat sends custom packets during the STATUS connection state that PacketEvents cannot process.
Steps to Reproduce:
Install InertiaAntiCheat mod on a Fabric server
Configure InertiaAntiCheat with validation method set to "individual" or "group"
Start the Minecraft server
From a Minecraft client, attempt to refresh the multiplayer server list (or ping the server directly)
Observe PacketProcessException in server console
Expected Behavior:
Server list pings should work normally without errors
InertiaAntiCheat should not interfere with basic server discovery functionality
PacketEvents should handle or ignore unknown packets gracefully
Actual Behavior:
PacketProcessException: Failed to map the Packet ID 2 to a PacketType constant. Bound: CLIENT, Connection state: STATUS, Server version: 1.21.9
Client connection is terminated/disconnected
Server console shows the stack trace below

com.github.retrooper.packetevents.exception.PacketProcessException: Failed to map the Packet ID 2 to a PacketType constant. Bound: CLIENT, Connection state: STATUS, Server version: 1.21.9
at com.github.retrooper.packetevents.event.ProtocolPacketEvent.(ProtocolPacketEvent.java:92)
at com.github.retrooper.packetevents.event.PacketSendEvent.(PacketSendEvent.java:37)
at com.github.retrooper.packetevents.event.simple.PacketStatusSendEvent.(PacketStatusSendEvent.java:32)
at com.github.retrooper.packetevents.util.EventCreationUtil.createSendEvent(EventCreationUtil.java:51)
at com.github.retrooper.packetevents.util.PacketEventsImplHelper.handleClientBoundPacket(PacketEventsImplHelper.java:59)
at com.github.retrooper.packetevents.util.PacketEventsImplHelper.handlePacket(PacketEventsImplHelper.java:44)
at io.github.retrooper.packetevents.handler.PacketEncoder.handlePacket(PacketEncoder.java:148)
at io.github.retrooper.packetevents.handler.PacketEncoder.write(PacketEncoder.java:132)
... (network stack)
at net.minecraft.class_3251.handler$bla000$inertiaanticheat$injectSendAnticheatDetails(class_3251.java:1038)
at net.minecraft.class_3251.method_12697(class_3251.java)
at net.minecraft.class_2935.method_12699(class_2935.java:32)
at net.minecraft.class_2935.method_65081(class_2935.java:8)
at net.minecraft.class_2535.method_10759(class_2535.java:207)
at net.minecraft.class_2535.method_10770(class_2535.java:192)
at net.minecraft.class_2535.channelRead0(class_2535.java:68)

Root Cause Analysis:
Source: ServerQueryNetworkHandlerMixin.injectSendAnticheatDetails() in InertiaAntiCheat
Trigger: Server list ping (QueryPingC2SPacket) during STATUS connection state
Problem: InertiaAntiCheat sends AnticheatDetailsS2CPacket with custom packet ID "inertiaanticheat:anticheat_details" (maps to ID 2)
Failure Point: PacketEvents PacketEncoder cannot map packet ID 2 in STATUS state, causing PacketProcessException
Key Code (from InertiaAntiCheat source):
@Inject(method = "onQueryPing", at = @at("HEAD"))
private void injectSendAnticheatDetails(QueryPingC2SPacket packet, CallbackInfo ci) {
if (InertiaAntiCheatServer.validationMethod == ValidationMethod.INDIVIDUAL ||
InertiaAntiCheatServer.validationMethod == ValidationMethod.GROUP) {
this.connection.send(new AnticheatDetailsS2CPacket(details));
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions