How winsrewu/noglerr works
Main Components
• Minecraft Client Integration: Since the mod is meant for the client only (as noted in the README), start by placing the “Minecraft Client” component showing where the mod hooks into the Minecraft runtime.
• Core Mod Loader/Entry Point: Represent the main mod entry (e.g., classes like NoglerrClient.java) which initializes the mod’s systems.
• Command System: Include the command package that implements several custom commands (e.g., NoglerrCommand, ShowVarCommand, VoskCommand). This component interacts with the Minecraft chat/command interface.
• Configuration Management: Show a dedicated “Config” or “Settings” component that loads and manages mod configurations (see files in the config package such as ConfigHandler.java, Configs.java, Hotkeys.java).
• Event Handling System: Indicate an “Events” component that deals with various game events (tick events, input, entity updates) based on classes like ClientTickHandler, EntityHandler, Callbacks, and OnTick.
• Mixin and Extension Layer: Outline the “Mixin” component that alters vanilla behaviors (e.g., EntityMixin, MouseMixin) to integrate mod logic into Minecraft’s internal systems.
• “Variable Tweaks” (organized under org.jawbts.noglerr.tweak.var and its subpackages for var, script, and javascript proxy classes) which allow dynamic entity data manipulation and script integration.
• “Voice-to-Text Module” (in the tweak.voice package with Vosk and VoskThread classes) that integrates with the external vosk API for speech recognition.
• Other experimental functionalities (such as entity tracer and assistants for handling projectiles or specific game entity attributes).
• Utility/Helper Components: Highlight support utilities (for example, UpdateChecker, PlayerMessageSender, and general Utils classes) that assist in mod operations and user notifications.
Relationships and Interactions
• Core Mod Loader propagating initialization calls to the Event Handling System, Command System, and Configuration Management.
• The Command System should be shown interacting with both the Event Handling (e.g., user-triggered events) and the Configuration Management (to read/update settings).
• The Mixin Layer needs to be drawn as intercepting calls from the Minecraft runtime and redirecting them to the mod’s internal handlers (like Event Handling or Tweaks).
• The “Variable Tweaks” and “Voice-to-Text Module” should be depicted as specialized submodules of “Tweaks,” with lines indicating that they rely on external libraries (Vosk API for voice and Nashorn/Javascript for scripting).
• That the mod also supports scripting with JavaScript (via Nashorn) by linking these packages to a “Scripting & Proxy” component.
Architectural Patterns / Design Principles
• Event-Driven Design: Indicate that a significant aspect of the mod architecture is event handling with callbacks and tick handlers integrating with Minecraft’s game loop.
• Integration via Mixins: Note the use of mixin injections to alter vanilla functionality without directly modifying game code.
• Extensibility via Scripting: Emphasize the plugin-like mechanism available by externalizing certain logic (scripts), which acts as hooks for mod developers/users to extend behavior dynamically.
Relevant Technologies and External Dependencies
• External Libraries: Clearly mark dependencies such as:
• “vosk-api” for voice-to-text functionality.
• “nashorn” for JavaScript integration.
• “malilib” as a required dependency on the client.
• Resource Files: Represent that assets (language files, mod JSON descriptors like fabric.mod.json and mixins.json) are part of the configuration for mod metadata and localization.