🧠 Leiv's API
Leiv's API is the central brain and logical framework of the Leiv Ecosystem Suite.
While Leiv's Lib provides the mathematical and structural foundation, Leiv's API handles the intelligence. It is a pure logic and configuration framework designed to completely eliminate messy, repetitive config code across all my mods. By centralizing settings management, this API ensures that all mods in the Leiv Ecosystem (like ItemCuller and others) are incredibly stable, highly configurable, and perfectly synchronized.
⚠️ PLAYER NOTE: This is a required core dependency for mods within the Leiv Ecosystem. It does not add content on its own, but must be installed alongside any of my utility mods to handle their configurations and logic!
✨ Key Features
- ⚙️ Centralized Configurations: Instead of every mod reading and writing its own chaotic config files, Leiv's API handles everything through a single, unified system.
- 💾 Rock-Solid Persistence: Guarantees safe, efficient, and corruption-proof JSON saving and loading directly within your game's
config/folder. - 🧩 Seamless Mod Synergy: Creates a standardized ruleset that allows all my mods to communicate their settings seamlessly to each other (and eventually to the GUI).
- 🛡️ Error-Free Validation: Built-in intelligent validation ensures that invalid config entries or user errors are caught instantly before they can crash the game.
🛠️ Technical Highlights (For Developers & Modpack Creators)
Leiv's API provides a completely decoupled, game-code-free architecture for maximum maintainability:
- 🧠 The RuleEngine: A robust, 100% unit-testable engine that processes and manages the entire configuration logic without relying on direct game code.
- 📐 ValueRule<T> System: Generic configuration objects that support built-in validation and dynamic
onChangeevent listeners for instant in-game updates. - 📋 RuleLayouts: A powerful system for logically grouping settings into categories, making dynamic UI generation (via Leiv's Config Menu) a breeze.
- ⏱️ High-Speed I/O: Optimized file reading and writing processes to ensure that loading mod configurations never slows down the game startup.
🔗 Dependencies
To keep the ecosystem clean and modular, this API relies on the foundational framework:
- Requires: Leiv's Lib (Make sure this is installed!)
- Used By: Leiv's Network, Leiv's Config Menu, ItemCuller, and all other Leiv Ecosystem end-mods.
💬 Community & Support
Got questions, feedback, or need to report a bug? Join the community!
- 👥 Discord: Join Leiv's Community
- 🐛 Issue Tracker: Report bugs via the official Discord ticket system or our GitHub Issues page.

