Skip to content

Presence Footsteps

BonsUnleashed edited this page Oct 7, 2026 · 3 revisions

Presence Footsteps

Minecraft 1.20.1 / Forge: this page documents that build and its measurements. For the separate 170-control Minecraft 1.21.1 port, see Minecraft 1.21.1 NeoForge.

One control for Presence Footsteps 1.20.1-1.9.1-beta.1 (mod id presencefootsteps), client-side: duplicate footstep targets are tracked in a small primitive set. The switch checks the code it would change against the tested build; another build is left untouched with one WARN line (see How the patches are applied).

Key Target Side Since Kind Result
presencefootsteps_duplicate_tracking Presence Footsteps 1.20.1-1.9.1-beta.1 CLIENT 1.0.6 opt 1,912 → 224 B per capped selection

presencefootsteps_duplicate_tracking

Since: 1.0.6 · Script (1.0.19 and earlier): furious6-SoundEngine.js · Helper: agentcraft.pure.AcFootstepSet Patched: eu.ha3.presencefootsteps.sound.SoundEngine.getTargets Mixin (since 1.0.20): SoundEngineMixin

What upstream did. When more entities are in range than the footstep cap, the capped selection tracked duplicates with boxed Objects.hash(...) varargs arrays and HashMap nodes for every entity considered.

What the patch does. Computes the same 32-bit hash in scalar arithmetic and tracks it in a lazily allocated primitive int set that lives only for one selection.

What stays the same. Hash collisions (the same hash is used, so the same pairs collide), getter and hash order, the current cap, player and camera exemptions, entity order, distance callbacks and audio cadence; the below-cap path is untouched.

Measured. Duplicate tracking with cap 16: 1,635 → 1,334 ns and 1,912 → 224 B; cap 64: 2,218 → 1,346 ns and 7,704 → 1,040 B. The 160-entity full selection allocated less (6,200 → 3,936 B and 14,440 → 5,664 B) but its timings varied between runs, so no full-query speedup is claimed.

Bons and Furious

Minecraft 1.20.1 / Forge 1.0.34

Compatibility

Controls by mod

Links

Clone this wiki locally