Skip to content

Cryptic Foes

BonsUnleashed edited this page Oct 7, 2026 · 3 revisions

Cryptic Foes

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.

Two controls for Cryptic Foes 1.0.4 (mod id crypticfoes): the Howler model remembers its animation bones instead of walking the part tree for every bone on every frame, and the sound listeners test a sound once instead of once per entity. Every 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
crypticfoes_howler_bone_cache Cryptic Foes 1.0.4 BOTH 1.0.2 opt animation bones looked up once instead of a part-tree walk per bone per frame
crypticfoes_sound_listener_invariant Cryptic Foes 1.0.4 BOTH 1.0.21 opt 1,185 → 20 ns per non-bell sound with 3,000 entities

crypticfoes_howler_bone_cache

Since: 1.0.2 · Script (1.0.19 and earlier): bons_and_furious-ModelHowler.js Patched: com.min01.crypticfoes.entity.model.ModelHowler (descendant lookup override) Mixin (since 1.0.20): ModelHowlerMixin

What upstream did. Resolved animation bones by walking the model's part tree by name for every animated part on every frame.

What the patch does. Overrides the descendant lookup with a per-model cache of successful and missing lookups (capped at 256 names) that delegates to the original method on first use; newly baked models start empty.

What stays the same. Root behaviour and first-match ordering where bone names repeat; geometry, animation definitions, rendering and setupAnim bodies are byte-identical. Identical poses across all 12 animations, 10 timestamps and 3 weights (10,136 assertions).

Measured. No timing benchmark was run; this entry is justified by the removed per-frame tree walks and verified by pose equality only.


crypticfoes_sound_listener_invariant

Since: 1.0.21 · Side: BOTH · Mixin: SoundListenerScanMixin · Helper: bons.furious.patch.crypticfoes.EntityScan Patched: com.min01.crypticfoes.event.EventHandlerForge.onPlayLevelSoundAtPosition and onPlayLevelSoundAtEntity

What upstream did. Cryptic Foes wakes sleeping Howlers when a bell rings or a goat horn sounds nearby. Its two sound listeners run for every sound played in a level, walk every entity of that level and test the sound again for each entity, although the sound does not depend on the entity.

What the patch does. Wraps the entity walk so that the first entity is handed over unchanged and, before the second, the entity-independent sound test is evaluated once: when it is false every later iteration would only skip, so the walk ends there; bell and goat-horn sounds walk every entity exactly as before. The entities are passed through untyped, so Cryptic Foes' own cast happens where it always did. Cryptic Foes is All Rights Reserved, so the mixin carries only the wrapper; its code stays in the installed class.

What stays the same. Which Howlers wake and every exception: 3,000 randomized cases (empty levels, null sounds, sleeping Howlers in and out of range) agreed with the original, and the 1.0.21 client run played a bell and a stone sound through both listeners.

Measured. 1,185 → 20 ns for a non-bell sound with 3,000 entities in the model. The listener was 0.21 % of the server thread in a profile.

Bons and Furious

Minecraft 1.20.1 / Forge 1.0.34

Compatibility

Controls by mod

Links

Clone this wiki locally