Skip to content
BonsUnleashed edited this page Oct 10, 2026 · 5 revisions

Occult

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

One control for Occult 1.0.0 Alpha 5 (mod id occult): its bed scan runs only on the server and only in loaded chunks, and draws its 1-in-1000 roll before it reads any block. This deliberately changes when the work happens; the section explains it. 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
occult_bed_scan_guard Occult 1.0.0 (Alpha 5) BOTH 1.0.2 (1.0.10) change 3,071 → ~3 block reads per player tick

occult_bed_scan_guard

Since: 1.0.2, server path revised in 1.0.10 · Kind: deliberate behaviour change · Script (1.0.19 and earlier): bons_and_furious-TendrilsBedProcedure.js Patched: occult.procedures.TendrilsBedProcedure.execute (Occult 1.0.0 Alpha 5) Mixin (since 1.0.20): TendrilsBedProcedureMixin

What upstream did. On every player tick, on the client as well as the server, the procedure scanned the 3,071 positions of a 19×19×19 sphere around the player and read each block through LevelAccessor.getBlockState. On the server that read loads, and if necessary generates, any chunk that is not ready, so a player standing next to unfinished terrain parked the server thread until the chunk had been generated. A normal-play spark caught the server path parked in chunk generation for 152 s of a 12.8-minute profile (100 % of one minute, 92 % of the next).

What the patch does.

  • Since 1.0.2: returns before the scan unless the level is a ServerLevel (the client scan was pure waste), and references vanilla's minecraft:beds tag directly instead of allocating a tag identifier per position.
  • Since 1.0.10: takes the procedure's independent Math.random() < 0.001 draw before reading anything, and reads the block through ServerChunkCache.getChunkNow, skipping a position whose chunk is not already loaded instead of loading or generating it.

What stays the same. A position still spawns Tendrils when it holds a bed, its block light is 6 or less and its 1-in-1,000 draw succeeds, with the same spawn reason, position and zero motion, so the chance per dark bed block per tick is unchanged; tag membership still follows reloads.

Deliberate differences (1.0.10). Math.random() is drawn for every position of the sphere (about 3,071 draws per player tick instead of one per dark bed block; Math.random is the JVM-wide generator, not a world or entity random, so nothing else's sequence changes), and a position in a chunk that is not loaded is skipped for that tick instead of forcing the chunk to load.

Measured. 1.0.2: removes all 3,071 block reads per client invocation; across 96 server scenarios the original and patched code produced identical ordered queries, spawns, RNG draws and motion (579 assertions). 1.0.10: server block reads fall from 3,071 to about 3 per player tick, and no chunk is ever loaded by the scan.

Bons and Furious

Minecraft 1.20.1 / Forge 1.0.38

Compatibility

Controls by mod

Links

Clone this wiki locally