Skip to content

EntityCulling

BonsUnleashed edited this page Oct 10, 2026 · 5 revisions

EntityCulling

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 EntityCulling 1.10.5 (mod id entityculling), client-side: the occlusion cache is cleared only where the last pass wrote. The patched classes are the bundled OcclusionCulling library (MIT), so the mixin carries a modified copy of the methods it replaces. 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
entityculling_dirty_cache_reset EntityCulling 1.10.5 CLIENT 1.0.23 opt 64 → 18 µs per reset, about 100 per second

entityculling_dirty_cache_reset

Since: 1.0.23 · Side: CLIENT · Mixin: DirtyCacheResetMixin Patched: com.logisticscraft.occlusionculling.cache.ArrayOcclusionCache (reset and the four state writes; the whole class is fingerprinted)

What upstream did. Before every culling pass (about 96 per second) the 4 MiB occlusion cache (at the 128-block tracing distance) was wiped with a full fill, although a pass only writes the voxels its rays visit.

What the patch does. The cache notes each byte it writes for the first time since the last reset, and the reset zeroes exactly those bytes; after more than 8,192 such bytes it uses the full fill. The method bodies are the library's own (MIT) with the dirty list added.

What stays the same. After every reset the cache is all zeros, as before, and every read between resets sees the same state: offline 300 culling passes (5.9 million cache operations) were identical to the installed class. Loaded and exercised in the 1.0.23 client run.

Measured. A reset costs 18 µs instead of 64 µs with 2,000 touched voxels; it filled 4 MiB about 100 times a second before.

Bons and Furious

Minecraft 1.20.1 / Forge 1.0.39

Compatibility

Controls by mod

Links

Clone this wiki locally