Skip to content

CIT Reforged

BonsUnleashed edited this page Oct 10, 2026 · 5 revisions

CIT Reforged

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 CIT Reforged 1.0.2 (mod id citreforged): its item caches are built on first use instead of for every item stack that is created. 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
citreforged_lazy_stack_caches CIT Reforged 1.0.2 BOTH 1.0.30 opt

citreforged_lazy_stack_caches

Since: 1.0.30 · Target: CIT Reforged 1.0.2 · Side: BOTH · Kind: opt

Mixin: CitLazyCachesMixin

CIT Reforged builds its item caches on first use. CIT Reforged is normally a client mod; on a server that also has it installed, the switch works there too. CIT Reforged gives every item stack four small caches (item, armor, elytra and enchantment textures) the moment the stack is created, including the many stacks that are copied, used for recipes or tooltips and never drawn. The switch creates each cache the first time CIT Reforged asks for it, exactly as CIT Reforged creates it, so drawn items look the same and stacks that are never drawn cost less.

Idea: HTP CIT Resewn Optimizer (Fabric), idea text only

Measured: creating an item stack 56.6 -> 39.7 ns and 424 -> 312 bytes, copying one 159 -> 119 ns; 122,472 checks over every way of creating a stack identical; the caches were 0.2-0.5% of all client memory allocation in this pack

Bons and Furious

Minecraft 1.20.1 / Forge 1.0.41

Compatibility

Controls by mod

Links

Clone this wiki locally