Report accurate horse stats from compass - #38
Open
grepsedawk wants to merge 1 commit into
Open
Conversation
The compass horse checker showed wrong numbers. Jump height came from a curve-fitted polynomial that was never accurate and drifted further from reality as jump strength rose: a horse that reaches ~5.4 blocks was reported as 4.9. Speed used a stale conversion constant, and all stats were read from the attribute base value, which hides modifiers from gear, potions, or other plugins. Compute jump height by simulating the actual jump instead: each tick the horse rises by its velocity, then velocity falls by gravity (0.08) and is scaled by drag (0.98); the peak is the sum of the upward velocities. Update the speed constant to match the current horse speed table. Read every stat from the effective attribute value so the displayed numbers match what the horse actually does.
grepsedawk
force-pushed
the
horse-stats-inaccurate
branch
from
June 14, 2026 11:02
d92353b to
fac10fa
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The compass horse checker (right-click a horse with a compass) reported wrong stats:
Fix
Jump height: simulate the real jump instead of approximating. Each tick the horse rises by its velocity, then velocity falls by gravity (0.08) and is scaled by drag (0.98); the peak is the sum of the upward velocities. Verified against decompiled 1.21.x
LivingEntityphysics.Speed: update the constant from
42.158to43.17037(= 14.57 b/s ÷ 0.3375), matching the current horse speed table (4.86 / 9.71 / 14.57 b/s).Effective values: read every stat via
getValue()instead ofgetBaseValue(), so modifiers (gear, potions, other plugins) are reflected. FasterHorses sets the base value, so its speeds were already shown — this also covers modifier-based changes.Module compiles.