Skip to content

Ground Rest Fixes

This page documents the historical resolution of standing-still velocity artifacts (1.57 m/s or residual gravity deltas) while resting on blocks.


📊 Ground Rest Fix Infobox

AspectLegacy Implementation (v1.0.0)Modern Implementation (v1.1.0+)
Physics MethodCustom position delta ($\Delta p = p_t - p_{t-1}$)Vanilla Entity.getKnownSpeed() API
Resting Speed IssueShowed $1.57\text{ m/s}$ due to gravity resetsShows $0.00\text{ b/s}$ cleanly when stationary
Ground DetectionAd-hoc block collision checksNative Minecraft velocity vector management
AccuracyProne to tick rounding errors100% precision aligned with vanilla physics

🛠 Problem & Solution Analysis

The Legacy Resting Artifact

In early releases (v1.0.0), calculating velocity by subtracting coordinates between consecutive render frames caused a bug: when standing on solid ground, Minecraft continuously resets the player's downward velocity downward vector ($v_y \approx -0.0784$). Custom delta calculations recorded this as active movement, resulting in phantom speed readings of $1.57\text{ m/s}$ while standing completely still.

The Fix: Native getKnownSpeed() Integration

Starting in v1.1.0, Speedometer eliminated custom position delta calculations in favor of Minecraft's native Entity.getKnownSpeed() API:

java
Vec3 knownSpeed = entity.getKnownSpeed();

Because vanilla's getKnownSpeed() accounts for block collisions and ground friction state before committing the movement vector, stationary players and entities cleanly report $(0.00, 0.00, 0.00)$, yielding $0.00\text{ b/s}$.


Official documentation & web portal for Dasik Igaijinn mods.