$ show FlashyReese/sodium-extra
Sodium Extra is a client-side Minecraft mod that extends the Sodium performance mod with additional graphical options, visual bug fixes, and performance tweaks. Architecturally, it is a mixin-heavy mod built with the Architectury multi-platform toolchain, supporting both Fabric and NeoForge loaders. It injects into Minecraft's rendering, fog, particle, GUI, and entity systems via over 50 mixin classes, controlled by a custom mixin configuration system (CaffeineConfig). Key entry points include `SodiumExtraClientMod` (initialization, config registration, debug HUD), `SodiumExtraMixinConfigPlugin` (runtime mixin filtering based on user options), and platform-specific initializers (`SodiumExtraFabricClientModInitializer`, `SodiumExtraNeoForgeClientMod`). External dependencies are Sodium (required), Minecraft, and optionally ModMenu and Greenlight (for server-authorised fog). The mod is best described as 'OptiFine's eye-candy options for Sodium', providing fine-grained toggles for animations, particles, fog, sky/clouds, biome colors, toasts, overlays, and many performance-related features. It is not a data or research project.
The LLM identified 2 files worth highlighting for reuse:
A generic mixin configuration system that allows mods to define options with dependencies, mod overrides, and file-based persistence. It reads and writes a JSON config file atomically with corruption recovery (via ConfigFileIO). Each option can have explicit dependencies on other options and on mod presence, enabling conditional mixin loading. The CaffeineConfigPlugin uses these options to decide which mixins to apply at runtime. This design is self-contained and could be extracted as a reusable library for other mods needing config-driven mixin behaviour.
A utility class that handles atomic file writes for the mod's config file. It first writes to a temporary file, then renames to the target path, and if the target file is corrupted or missing, it resets to defaults and logs a warning. This pattern prevents config corruption from crashes or partial writes. While simple, the implementation is clean and parameterized, making it reusable in any project that needs safe config persistence.