Skip to content
BonsUnleashed edited this page Oct 7, 2026 · 3 revisions

Spawn

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.

Four controls for Spawn 4.0.7-1.20.1 (mod id spawn): sea-life decorations tick without a new Random per tick and remember whether their block state is waterlogged, the fly check skips entities without flies, and a fix stops the zombified-flower ground search at the bottom of the world (inside a Distant Horizons generation region it never ended). Background on Generation context fixes. 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
spawn_flyless_particle_check Spawn 4.0.7 BOTH 1.0.29 opt 44.1 → 21.6 ns and 22.4 → 7.5 B per call
spawn_sealife_tick Spawn 4.0.7-1.20.1 BOTH 1.0.3 opt 89.8 → 66.2 ns sea bunny
spawn_sealife_waterlogged_memo Spawn 4.0.7 BOTH 1.0.30 opt 9.6 → 4.7 ns per check
spawn_zombified_flower_floor Spawn 4.0.7-1.20.1 BOTH 1.0.19 fix the ground search ends at the bottom of the world (it never ended in an empty column)

spawn_sealife_tick

Since: 1.0.3 · Script (1.0.19 and earlier): furious3-SeaLifeDecoBlockEntity.js Patched: com.ninni.spawn.server.block.entity.SeaLifeDecoBlockEntity.tick (Spawn 4.0.7-1.20.1) Mixin (since 1.0.20): SeaLifeDecoTickMixin

What upstream did. Spawn's sea-star, sea-urchin and sea-bunny decoration block entities created a new java.util.Random seeded from the block position on every tick just to draw one interval, and routed movement through boxed helper calls.

What the patch does. Computes the same first-draw arithmetic of java.util.Random (including its rejection sampling) directly for the three known classes and passes the two movement floats primitively. Unknown subclasses keep the original fresh Random and virtual call.

What stays the same. Public movement and target-vector behaviour, world RNG calls, tick cadence and interpolation; 1,000,032 seeded interval comparisons and 192,000 paired tick steps identical by raw bits.

Measured. Sea star tick 38.0 → 33.6 ns, sea urchin 42.1 → 40.6 ns, sea bunny 89.8 → 66.2 ns and 80.1 → 24.1 B per tick.


spawn_flyless_particle_check

Since: 1.0.29 · Target: Spawn 4.0.7 · Side: BOTH (acts on the server, incl. the integrated server) · Kind: opt

Mixin: FlyDataIdleMixin

Spawn's fly check skips entities without flies between its rolls. Spawn runs its fly-particle check for every living entity every tick. For an entity without flies it only asks whether the entity is in water or a bubble column (a block read, which Valkyrien Skies wraps) and whether it is on fire, and on every hundredth tick draws one random number for a sound that can never play. The switch asks the tick first and makes the same two checks and the same draw only on those ticks. Same random numbers, no particles or sounds either way. Entities with flies, entity classes with their own water or fire checks or their own water update, and entities whose Forge data tag does not exist yet (Create's fire-immunity check creates it) run Spawn's code unchanged.

Measured: offline on the real classes (with Create's fire-immunity hook) 44.1 -> 21.6 ns and 22.4 -> 7.5 B per call (an earlier run: 53.5 -> 25.0 ns); 400,000 calls identical (1.6 million checks), the entity's saved Forge data identical over 150 ticks in and out of water. 13 of the pack's 1,404 mob classes keep Spawn's code because of their own water update. In-game JFR before: Spawn's check was 0.6-1.7% of the integrated server thread (Bons and Furious 1.0.26).


spawn_sealife_waterlogged_memo

Since: 1.0.30 · Target: Spawn 4.0.7 · Side: BOTH · Kind: opt

Mixin: SeaLifeWaterloggedMixin

Spawn: sea-life decorations remember whether their block state is waterlogged. Spawn's sea bunnies, sea stars, sea urchins and other sea-life decorations tick on both sides for every decoration in loaded chunks, and each tick first asks whether the block state is waterlogged (with FerriteCore a hash lookup of the state's properties). The answer is now remembered per block state, as for Particular's chests (one shared table), and is always the very value the state gives. The rest of the tick is unchanged; spawn_sealife_tick's changes still apply. What else the tick costs is the read of each decoration's own target position, which any exact version must keep.

Idea: our own (found in our own 1.0.26 profile: Spawn's sea-life ticker, 0.25-0.65% of the client main thread, 0.04-0.22% of it this check).

Measured: offline on the real classes with FerriteCore's state map: 9.6 -> 4.7 ns per check (2.1x), 257 -> 240 ns with other block-state work in between (1.07x), no allocation; the same exactness run as particular_chest_waterlogged_memo.


spawn_zombified_flower_floor

Target: Spawn 4.0.7-1.20.1 · Side: BOTH · Since: 1.0.19 · Kind: fix Patched: com.ninni.spawn.server.level.feature.ZombifiedFlowerFeature — 1.0.19 script furious19-spawn-ZombifiedFlowerFeature.js (exact fingerprint of the replaced method) Mixin (since 1.0.20): ZombifiedFlowerFloorMixin

What upstream did. The zombified-flower feature looks for ground by walking downwards "while the block is replaceable", with no lower limit. Inside a Distant Horizons generation region every block below the loaded terrain reads as air, so the walk continued to y −1,000,001 (about a million block reads and a new Vec3i per step) until Distant Horizons' bounds check threw, which aborted that chunk's whole feature step.

What the patch does. The loop also stops at the level's minimum build height. In normal generation bedrock or ground always stops it first, so the placed flowers are the same; in an empty column it ends at the floor, finds no dirt and places nothing, as the original would have if it had terminated.

What stays the same. Every placement outside an empty column: six seeded placements of spawn:patch_zombified_flower on a grass platform produced the identical 18 flower blocks with the switch on and off (same block-state hash).

Measured. Native full-pack server fixture, 2026-09-28: over the End's empty void, where the original walk never ends, the patched feature reached the floor and returned in 476 ms including generating that chunk (823 ms in the 1.0.19 requalification run of 2026-09-29). Like the other six fixes this is a repair, not a throughput figure.

Bons and Furious

Minecraft 1.20.1 / Forge 1.0.34

Compatibility

Controls by mod

Links

Clone this wiki locally