Repository navigation
AmbientSounds
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.
Three controls for AmbientSounds 6.3.8 (mod id ambientsounds), all client-side: a memo for its biome pattern matches, a bound for its terrain scan, and dimension name patterns that are compiled once. The terrain-scan bound is the largest single client-phase result in the mod. 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 |
|---|---|---|---|---|---|
ambientsounds_biome_match_cache |
AmbientSounds 6.3.8 | CLIENT | 1.0.2 | opt | ambient tick p95 3.790 → 2.029 ms |
ambientsounds_dimension_patterns |
AmbientSounds 6.3.8 | CLIENT | 1.0.23 | opt | patterns compiled once |
ambientsounds_terrain_scan_bound |
AmbientSounds 6.3.8 | CLIENT | 1.0.7 | opt | terrain analysis p95 −88.1 % |
Since: 1.0.2 · Script (1.0.19 and earlier): bons_and_furious-BiomeEnvironment_BiomeArea.js · Helper: AcBiomeMatchCache
Patched: team.creative.ambientsounds.environment.BiomeEnvironment$BiomeArea.checkBiome
Mixin (since 1.0.20): BiomeAreaMixin
What upstream did. On each environment scan AmbientSounds re-ran every biome regex condition of every loaded sound rule against the biome identifier string of every sampled position. In matched native windows the original executed 1,179,601 regex matches for 2,106,100 lookups.
What the patch does. Memoises the pure result of (regex pattern, biome identifier). Pattern keys are weak, so live rules keep their entries while discarded rules can be garbage-collected, and each pattern holds at most 256 identifiers. Tags, conditions and the scan cadence are still evaluated live; no biome holder, world state or sound decision is cached.
What stays the same. Current holder tags, condition evaluation, environment scanning, audio volume and every audible feature; 200,000 results were checked equal.
Measured. Ambient tick p95 3.790 → 2.029 ms and p99 6.491 → 4.294 ms.
History. The first version (1.0.2) used a fixed 128-pattern cache and thrashed once a pack had 131–141 live patterns; the weak-key memo shipped in 1.0.5 fixed that. If you saw no benefit from 1.0.2–1.0.4, that is why.
Since: 1.0.7 · Script (1.0.19 and earlier): furious7-AmbientHeight.js · Helper: agentcraft.pure.AcAmbientHeight
Patched: team.creative.ambientsounds.environment.TerrainEnvironment.getHeightBlock
Mixin (since 1.0.20): TerrainEnvironmentMixin
What upstream did. AmbientSounds' terrain analysis scans 121 columns from the build ceiling downward to the first solid, leaves or water block, on a recurring cadence. In a world with a 320-block ceiling most of that walk is empty air above the terrain.
What the patch does. Before the column walk, it checks the chunk's section palettes from the top with a conservative predicate (any block that canOcclude, is in the leaves tag, or is water) and starts the unchanged original loop at the highest section that could possibly contain a match. Only loaded, in-bounds columns of an exact ClientLevel are bounded; everything else keeps the original start. A stale palette entry (a block type that has since been removed from the section) only makes the scan start higher than necessary, never lower.
What stays the same. The original terrain predicate, the scan cadence, the out-of-range VOID_AIR case, null-section AIR, the minimum-height exclusion and the no-hit result. Height sums were equal in every check (3,087 native checks).
Measured. Terrain analysis median 3.2833 → 0.2772 ms and p95 5.4517 → 0.6496 ms (−88.1 %) over 40 analyses per condition; warmed per-column benchmark 26.46 → 2.51 µs. Whole-frame p99 did not improve in that run (15.89 → 16.14 ms), so this reduces the scan's cost without a proven smoothness gain.
Switching it off. Also honours the legacy -Dbons_and_furious.ambientHeight=false (1.0.15 and earlier: -Dbons.pure.ambientHeight=false, which newer builds still accept).
Since: 1.0.23 · Mixin: DimensionPatternMixin · Helper: bons.furious.patch.ambientsounds.DimensionPatterns
Patched: team.creative.ambientsounds.dimension.AmbientDimension.is
What upstream did. AmbientSounds tests the current dimension against its configured name patterns with a regular expression that was compiled again on every test.
What the patch does. Each pattern is compiled once and kept; a pattern that does not compile still throws the same error on every test. Separate from ambientsounds_biome_match_cache, which covers biome conditions.
What stays the same. Every answer: in game 308 dimension checks (11 dimensions × 28 levels) identical with compiled and string patterns; 18 patterns cached.
Measured. One regex compile per pattern per session instead of one per check.
Bons and Furious is licensed GPL-3.0-only with upstream notices retained. Target mod names identify compatibility targets and do not imply endorsement; their code, assets and licenses remain their authors' property. All measurements on this wiki are focused method, phase or reproduction measurements from the pack the mod was built for, taken on the historical build named in each entry; they are not whole-game FPS or TPS promises and are not additive.
Bons and Furious
Minecraft 1.20.1 / Forge 1.0.34
- Home
- Installation and configuration
- How the patches are applied
- All controls
- Measurements and caveats
- Whole-modpack benchmark
- Troubleshooting and log messages
- Generation context fixes
- Version history
Compatibility
- Compatibility
- Known conflicts and workarounds
- Tested mod list
- Redundant mods
- Compatibility and target versions
Controls by mod
- Minecraft (51)
- Forge (6)
- Ad Astra (1)
- Alex's Caves (4)
- Alex's Mobs (2)
- Almost Unified (1)
- AmbientSounds (3)
- Architectury API (1)
- Ars Nouveau (2)
- Artifacts (1)
- Better Combat (1)
- Bosses of Mass Destruction (1)
- Butterflies (1)
- ChunkSending (1)
- CIT Reforged (1)
- Citadel (1)
- CoFH Core (1)
- Colorwheel (1)
- Cooking for Blockheads (1)
- Create (4)
- Critters and Companions (1)
- Cryptic Foes (2)
- Cucumber (1)
- Curios API (6)
- Distant Horizons (17)
- Dungeons Delight (1)
- Dynamic Trees (2)
- Embeddium (13)
- Entity Model Features (4)
- Entity Texture Features (1)
- EntityCulling (1)
- FancyMenu (1)
- Farmer's Delight (2)
- FD Bosses (2)
- Fowl Play (2)
- Fusion (2)
- GeckoLib (5)
- Goblins Tyranny (2)
- Hostile Villages (2)
- Ice and Fire (6)
- ImmediatelyFast (3)
- Immersive Engineering (1)
- Jaden's Nether Expansion (1)
- JEI (7)
- Kiwi (1)
- L2 Library (2)
- Legendary Monsters (1)
- Lionfish API (2)
- ModernFix (4)
- Mowzie's Mobs (1)
- Mutant Monsters (1)
- Nether Depths Upgrade (1)
- Occult (1)
- Oculus (12)
- Oh The Biomes We've Gone (1)
- Particular (1)
- Pehkui (1)
- Pipez (2)
- Placebo (1)
- Presence Footsteps (1)
- Radium Re-Reforged (8)
- Regions Unexplored (1)
- Relics (2)
- Ribbits (1)
- Ryoamic Lights (2)
- Sake's Structures (1)
- Scorched (1)
- Scuba Gear (1)
- Simply Swords (1)
- SlashBlade: Resharped (1)
- Slice & Dice (1)
- Spawn (4)
- Storage Drawers (2)
- Structure Gel API (1)
- Structurify (3)
- TaCZ (2)
- TerraBlender (2)
- Terramity (1)
- Under the Moon (1)
- Valkyrien Skies (15)
- Trackwork model repair
- Living Engineering (moved out in 1.0.20)
Links