Gambiarra

Optimizations and crash fixes for popular 1.12.2 mods on Cleanroom, on the client and the server: faster world generation and saving, lighter per-tick work, OptiRefine and OptiFine fixes, and an entity LOD.

```markdown
**Gambiarra** speeds up and fixes other mods on **Cleanroom** (Minecraft 1.12.2, Java 25). It runs on the client and on the server, and it does not need Nothirium or OptiFine. A dedicated server only needs this jar.

It is made only of mixins that coexist with other mods. It does not change or redistribute any other mod's jar.

## How it stays safe
- **Code locks:** each optimization checks a fingerprint of the exact methods it changes. If a mod or the game has different code there, only that optimization turns off, and the log says why.
- **Same result:** an optimization never changes gameplay. **Validation mode** (`validationMode=true` in `config/gambiarra-worldgen.cfg`) runs it next to the original and counts the differences; the 1.0.0 test session ended with 0 differences in all 16 optimizations that have a comparison.
- **One option each:** every optimization has its own switch. Anything not yet proven in a real game ships **off**, marked experimental (`experimental=true` turns them all on).
- **Visible warnings:** an option that is on but did not start is shown once in the chat and listed in F3.

## What it does
Each item only acts when the target mod is present in the checked version.

**World generation and saving (server side)**
- Recurrent Complex Volts 2.0.1.x: abandoned maze searches stop; structures are refused before they are prepared; the structure data file can be saved on the disk thread (experimental).
- RTG Continued 1.0.7: skips Voronoi cells that cannot change the result.
- Additional Structures 2.5.0: the ground search starts at the highest section with blocks.
- Pulsar 0.6.x: deferred chunk retries test neighbours before the expensive lookup.
- Minecraft: ore veins read through the last chunk looked up; `session.lock` checked once per second instead of once per saved chunk; chunk saving looks up each palette state once (experimental).

**Per-tick work**
- Scaling Health 1.3.42: each mob's health and damage math done once, as the mod intends.
- Scape and Run Parasites 1.10.9: its spawner keeps a converted value instead of redoing it.
- Forgotten Items 1.3.1.4: the banned item list copies the registry once, not twice per item.
- Ice and Fire 1.9.1: the data it keeps on every mob is only written when it changes.
- Biomes O' Plenty 7.0.1 (client): the fog distance is computed once per tick, not on every fog event.
- Xaero's World Map 1.47.0: biome colour lookup through a method handle; chunk flush off the server thread and video memory read four times per second (both experimental).

**Crash fixes**
- Wonderful Enchantments 0.6.0: the Phoenix Dive crash.
- Minecraft: locating a stronghold before the generator built a chunk; fluid corners above the allowed height (Biomes O' Plenty honey).
- Pulsar with OptiRefine: the smooth lighting crash.

**Client fixes**
- OptiRefine v0.1.0-alpha with VintageFix: the game no longer stops at start; both apply as they are written, nothing is turned off. (With Nothirium, v0.1.0-alpha still does not start, for another reason: use OptiRefine 78ff8ce there.)
- OptiRefine: OptiFine Smart Animations working again; RenderLib no longer stops the game from starting. With the 78ff8ce build, also the crashes when releasing the zoom key and in water or lava with Custom Colors, and bent chest lids and stretched strips with shaders, and the black terrain and invisible held item after turning a shader pack off (OptiRefine v0.1.0-alpha fixed those, and with it these fixes stay off by themselves).
- LoliASM with OptiFine: inside-out leaves.
- OptiFine HD_U_G5 dynamic lights: a lock-free light lookup, and only the sections the light reaches are rebuilt (with Nothirium).
- Ice and Fire: dragon animations that are not playing are skipped.

**Entity level of detail (client, image only)**
- Model parts smaller than a pixel are not drawn; distant Ice and Fire dragons and Lycanites mobs animate less often.
- Impostors (experimental, off): very small distant mobs become an image, never closer than 32 blocks or on a mob in a fight. F3 shows the LOD decision for the mob under the crosshair.
- For now the small parts and the impostors only act on Tabula models (Ice and Fire) and Lycanites models; ordinary vanilla models are always drawn in full.
- Never on players, bosses, named mobs, mounts or the mob you are aiming at.

## Requirements
- Cleanroom 0.7.14-alpha or newer (Java 25). Nothing else: install it on the client, the server, or both.
- Recommended with **Gadolinium** on the client (shaders and GPU culling for Nothirium).

## Configuration
`config/gambiarra.cfg` (client fixes and LOD) and `config/gambiarra-worldgen.cfg` (world generation, server and validation mode). If something looks wrong, turn that option off and send `logs/latest.log`.

## License and credits
By Dragonborne. MIT. Parts follow the order of checks of [Recurrent Complex](https://github.com/Ivorforce/RecurrentComplex) (MIT) and a name rule of [OptiRefine](https://github.com/Ecdcaeb/OptiRefine) (MIT). A few methods repeat small pieces of Minecraft or OptiFine math so the result stays identical; that math remains subject to its owners' terms. Full notices in the jar's `NOTICE`.

Source code and issues: https://github.com/snwxMR/gadolinium-gambiarra
```

Gambiarra Team

profile avatar
  • 3
    Projects
  • 223
    Downloads

More from Dragonborne