How skytils/skytilsmod works
Project Type and Purpose
• SkytilsMod is a client-side Minecraft Forge mod for Hypixel Skyblock. It uses Gradle multi-module structure, Kotlin & Java, Mixin/ASM bytecode transformers, an event bus, and an embedded HTTP/WebSocket API.
File Structure Analysis
• Top-level modules:
• events/ – standalone event bus & mixin hooks
• hypixel-api/ – (likely) wrapper for Hypixel REST endpoints
• src/ – main SkytilsMod code: installer UI, tweaker, core services, features, commands, GUI, localapi & WS client
• scripts/ – build-time TypeScript utilities (e.g., combine, split)
• Key folders under src/main/kotlin/gg/skytils/skytilsmod/:
• tweaker/ – loading plugin & security manager
• mixins/ – Mixin init & extension hooks
• core/ – config, persistence, entity manager, data fetcher, update checker
• events/ – custom event definitions & impls
• commands/ – CLI commands & implementations
• features/ – modular feature implementations (dungeons, farming, slayers…)
• gui/ – Elementa-based overlays & configuration GUIs
• localapi/ – Ktor HTTP routes for external tools
• skytilsws/ – WebSocket client for real-time data
README Insights
• Describes hundreds of client-side utilities organized by category: general, dungeons, farming, mining…
• Emphasis on event-driven features, custom GUI overlays, mixin hooks, and external integration (local HTTP + WS).
Core Components & Their Interactions
a. Minecraft Client & Forge Mod Loader
• Minecraft runs under Forge; SkytilsMod is injected via a Tweaker and Mixin plugins.
b. Transformer Layer
• ASM & Mixin transformers modify game classes at load time (mixins.skytils.json).
c. Event Bus (events/)
• Captures game lifecycle events (packets, render, tick, GUI) and dispatches to registered listeners.
d. Core Services (core/)
• Config manager loads/saves user settings.
• EntityManager tracks in-game entities.
• DataFetcher obtains external data (e.g., Hypixel API).
• UpdateChecker calls GitHub Releases API.
• SoundQueue handles custom audio playback.
e. Features (features/)
• Subscribe to events to implement mod behaviors (dungeon solvers, spam hider, overlays).
f. Commands (commands/)
• Provide chat commands and route to GUI or core services.
g. GUI (gui/)
• Creates in-game overlays & configuration screens with Elementa.
h. Local API Server (localapi/)
• Ktor HTTP server exposing endpoints for waypoints, data, etc.
i. WebSocket Client (skytilsws/)
• Connects to remote WS (for live updates or cloud bridge).
j. Persistence
• PersistentSave writes config and user data to disk.
Architectural Patterns & Principles
• Modular event-driven architecture: decoupling game events (publish–subscribe).
• Layered design: transformer layer, core services, feature modules, presentation (GUI/API).
• Dependency inversion: features depend on interfaces in core & events modules.
• Separation of concerns: mixins/ASM only modify game; features only handle logic; GUI only handles rendering.