Aim extra knockback with Mth's sine table

Player.causeExtraKnockback pushes along Mth.sin/Mth.cos of the attacker's
yaw, which come from vanilla's 65536-entry table: facing east, the push
has no z at all. Horizon took f32 sin/cos, which left -4.4e-8 of z per
block of push (a sprinting or Knockback hit, on mobs and players).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-24 11:13:27 +02:00
parent c33acfdd05
commit 6a5c749f7c
2 changed files with 6 additions and 9 deletions
-5
View File
@@ -56,12 +56,7 @@ PROPERTIES = {
'pause-when-empty-seconds': '-1',
}
# Cases Horizon still gets wrong, and why.
YAW = "the extra knockback's direction comes from f32 sin/cos, not Mth's sine table (z is -2e-8 a block, not 0)"
KNOWN = {
'cow-sprint': YAW,
'cow-knockback-2': YAW,
'zombie-sprint': YAW,
'zombie-knockback-2': YAW,
'pvp-mace': "a smash on a player runs none of MaceItem.hurtEnemy (the attacker's fall goes on)",
}