LibX Mod — Guide
SandBox Worldgen Library
LibX includes a specialized sub-library known as SandBox. This component is dedicated to world generation and provides tools for other mods to create custom dimensions and structures.
- Surface Rules: Simplifies the creation of complex terrain patterns and biome-specific surface layers.
- Structure Placement: Provides more control over how and where structures (like dungeons or villages) spawn in the world.
- Dimension Logic: Handles the registration and management of custom dimensions, ensuring they integrate smoothly with the vanilla teleportation and chunk loading systems.
Technical Mechanics
LibX implements several advanced technical mechanics to improve the modding environment:
- Networking Wrapper: A simplified networking layer that allows mods to send data packets between the client and server with minimal overhead.
- Base Classes: Provides pre-optimized base classes for common objects like
BlockBase,ItemBase, andMenuBase, which include built-in support for tooltips, creative tab placement, and specialized rendering. - Render Types: Includes helpers for managing transparency and custom shaders, often used in mods that add magical effects or complex machinery.
Core Framework Features
The strength of LibX lies in its automated systems that handle the heavy lifting of mod development. These systems ensure that all dependent mods follow a standardized logic.
Registration System
LibX automates the registration of game objects (Items, Blocks, Tile Entities, etc.). It uses a "Registry Transformer" system that can automatically generate associated items for blocks (like BlockItems) or handle complex multi-block registrations in a single step.
Datagen System
To ensure compatibility and reduce errors, LibX provides a comprehensive Data Generation (Datagen) suite. This system is used by developers to automatically create: * Recipes: Standardizes crafting, smelting, and custom machine recipes. * Loot Tables: Manages drops for blocks and mobs. * Tags: Ensures cross-mod compatibility for materials like ores and ingots. * Models and Textures: Automates the creation of JSON model files for items and blocks.