Hit Delay Fix 1.8.9

if (packetIn.getOpCode() == 2) Entity entity = packetIn.getEntity(this.clientController.netClientHandler); if (entity != null && !entity.isEntityInvulnerable()) if (entity.hurtResistantTime <= 0) // Already triggered locally? entity.performHurtAnimation();

@Mixin(EntityPlayerSP.class) public abstract class MixinEntityPlayerSP @Inject(method = "sendUseEntity", at = @At("HEAD")) private void onSendAttackPacket(Entity entity, int action, float x, float y, float z, CallbackInfo ci) if (action == 0) // 0 = ATTACK if (entity != null) // Trigger hit visual client-side entity.performHurtAnimation(); // Play hurt sound locally entity.worldObj.playSound(entity.posX, entity.posY, entity.posZ, entity.getHurtSound(), entity.getSoundCategory(), 1.0f, 1.0f, false); hit delay fix 1.8.9

| Component | Vanilla Behavior | Expected Behavior | |-----------|----------------|------------------| | | Client sends packet, plays own arm swing immediately. | Same. | | Damage visual | Waits for SPacketEntityStatus from server. | Trigger immediately on attack send. | | Knockback | Relies on SPacketEntityVelocity (server). | Keep server-driven (anti-cheat). | | Invincibility frames | Server-managed; client syncs via entity health update. | No change. | if (packetIn

: The client checks for clicks every game tick (0.05 seconds). Because the player is spamming inputs within the penalty window, the counter frequently fails to reset to zero natively. | | Damage visual | Waits for SPacketEntityStatus

Implementing a directly resolves this flaw, restoring perfect parity to register high-clicks-per-second (CPS) attacks accurately.