How zhd99/mineminenomi works
Main Components
• Core/Initialization – This includes the main mod entry point (e.g. ModMain.java, ForgeSetup.java, ModSetup.java) and the various “init” packages (ModAbilities, ModBlocks, ModItems, ModEntities, etc.) that register and bootstrap the mod’s features.
• Abilities & Capabilities – A large portion of the code is dedicated to the “abilities” subsystem (organized under packages like “abilities”, “api/abilities”, “wypi/abilities”). This module manages the registration, execution, and networking of the 203+ abilities. It handles various types of abilities (active, passive, continuous, chargeable, etc.) and their corresponding events, models, renderers, and network synchronization.
• Entities, Blocks, and Items – The project defines custom blocks (including world gen features, custom machine-like blocks such as cannons, spawners, and dials), custom entities (mobs, animals, pirates, marines, quest givers and objectives), and items (weapons, armors, spawn eggs, consumables). These are organized into separate packages (entities, blocks, items, models, renderers) and have their own JSON data (loot tables, recipes, models, textures).
• Quests and Crew Systems – There is a comprehensive quest/mission subsystem (under quests and objectives packages) and a crew system (using jolly rogers, crew APIs) to drive the mod’s exploration and multiplayer aspects.
• Networking and Data Synchronization – The “packets” packages for client and server (both under “mineminenomi/packets” and “wypi/network/packets”) coordinate data transfer (e.g. synchronization of abilities, quests, and entity states) between the client and server.
• Events and Helpers – An event-driven architecture, typical of Minecraft Forge mods, is clearly used. There are many event listener packages (events, events/abilities, events/devilfruits, etc.) and helper classes (in the “helpers” and “data” packages) to facilitate game logic responses and data management.
Relationships and Interactions
• The Core Initialization module (ModMain/ModSetup) loads and registers all submodules at startup. It interacts with the Forge event bus to listen for game lifecycle events.
• Each subsystem (Abilities, Blocks, Entities, Items, Quests, etc.) registers itself via dedicated modules (like ModAbilities, ModEntities, etc.) and then operates by firing and handling events.
• The Abilities subsystem interacts with Entities (for example, applying an ability to a mob), and with the networking layer to synchronize state or trigger visual effects on the client. Data helpers and packet classes bridge these interactions.
• The Renderer and UI modules consume data from the world and entity systems, utilizing networking to keep client views in sync with server state.
• The quest and crew systems are integrated into the core gameplay loop. They update through events (e.g., quest events or crew updates) and rely on configuration and data JSON files for basis.
Architectural Patterns and Design Principles
• Modularity and Separation of Concerns: Each major feature (abilities, quests, blocks, etc.) is implemented as its own module/package, enabling easier maintenance and potential extensibility.
• Event-Driven Architecture: Forge’s event bus is used extensively; events drive the interaction between components (like ability activation, state sync, and world generation).
• Client-Server Communication: Dedicated packet classes exist to ensure that client-side rendering and UI stay in sync with server-side game logic.
• API and Abstraction Layers: The mod defines API classes (e.g., in the “api” packages) to abstract ability usage, entity stats, crew information, etc.
Relevant Technologies and Frameworks
• Minecraft Forge – The mod framework used to hook into the game engine.
• Gradle – The build system (with Gradle build scripts and wrapper).
• Java – The programming language, following object-oriented design and event-driven principles.
• JSON Data Files – For models, loot tables, recipes, and language localization.