# hannibal002/skyhanni architecture

> Architecture diagram of the GitHub repository hannibal002/skyhanni, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hannibal002/skyhanni
- Repository: https://github.com/hannibal002/skyhanni

## Overview

#### Purpose and Entry Points
SkyHanni is a client-side Fabric mod for Hypixel SkyBlock. Minecraft loads the mod through version-specific Fabric metadata, then the mod bootstrap coordinates initialization and feature registration. Primary entry points:
- `src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt`
- `src/main/java/at/hannibal2/skyhanni/SkyHanniModLoader.kt`
- `versions/26.1/src/main/resources/fabric.mod.json`

#### Runtime Integration Boundary
The mod runs inside the Minecraft client and uses mixins/class tweaking to observe or alter game rendering, GUI, network packets, input, entities, sounds, and screens. Mixins are the low-level boundary; higher layers should prefer emitted events and compatibility abstractions rather than direct Minecraft internals.
- `src/main/resources/mixins.skyhanni.json`
- `src/main/java/at/hannibal2/skyhanni/mixins/init/SkyHanniMixinPlugin.java`
- `src/main/java/at/hannibal2/skyhanni/utils/compat/MinecraftCompat.kt`

#### Event and State Pipeline
Minecraft/Fabric callbacks and mixin hooks produce typed SkyHanni events. API/data managers consume chat, scoreboard, inventory, entity, world, packet, and render signals to maintain interpreted SkyBlock state; features subscribe to that state or to domain events.
- Event bus/core: `src/main/java/at/hannibal2/skyhanni/api/event/SkyHanniEvents.kt`, `src/main/java/at/hannibal2/skyhanni/api/event/EventHandler.kt`
- Minecraft adapters: `src/main/java/at/hannibal2/skyhanni/api/minecraftevents/ClientEvents.kt`, `src/main/java/at/hannibal2/skyhanni/events/minecraft/SkyHanniTickEvents.kt`
- State extraction: `src/main/java/at/hannibal2/skyhanni/data/ScoreboardData.kt`, `src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt`

#### Feature Layer
The bulk of the product is independently configurable event-driven features, organized by SkyBlock domain (garden, mining, dungeon, fishing, rift, inventory, chat, etc.). Features transform state into overlays, highlights, notifications, command behavior, or inventory/chat modifications. Representative domain roots:
- `src/main/java/at/hannibal2/skyhanni/features/garden/GardenApi.kt`
- `src/main/java/at/hannibal2/skyhanni/features/mining/HotxFeatures.kt`
- `src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonApi.kt`

#### Configuration and Persistent Client Data
`SkyHanniConfig` is the feature-toggle/settings graph, backed by config loading, migration, GUI editing, and storage scopes for player/profile/resettable data. Commands expose configuration and operational entry points, including `/sh` and `/skyhanni`.
- `src/main/java/at/hannibal2/skyhanni/config/SkyHanniConfig.kt`
- `src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt`
- `src/main/java/at/hannibal2/skyhanni/config/commands/CommandsRegistry.kt`

#### Repository-Driven and Remote Data
A repository manager separates remotely maintained content/configuration from compiled code, with disk and memory filesystem implementations and reload events. JSON schemas model repository content, including patterns, locations, items, events, and graph settings. Other integrations include Hypixel Bazaar data, NotEnoughUpdates data, Modrinth releases, and Discord IPC.
- `src/main/java/at/hannibal2/skyhanni/data/repo/SkyHanniRepoManager.kt`
- `src/main/java/at/hannibal2/skyhanni/data/repo/GitRepo.kt`
- `src/main/java/at/hannibal2/skyhanni/api/enoughupdates/EnoughUpdatesRepoManager.kt`

#### Rendering, Navigation, and Build Architecture
Rendering utilities provide custom HUD/world drawing, shaders, renderables, and item-atlas rendering used by features. Navigation models islands as graphs and uses Dijkstra paths rendered in-world. The Gradle/Kotlin build includes a KSP annotation-processor module that generates module/primary-function/version wiring.
- `src/main/java/at/hannibal2/skyhanni/utils/render/SkyHanniRenderPipeline.kt`
- `src/main/java/at/hannibal2/skyhanni/data/model/graph/DijkstraTree.kt`
- `annotation-processors/src/main/kotlin/at/hannibal2/skyhanni/skyhannimodule/ModuleProcessor.kt`

Main entry points: [`src/main/java/at/hannibal2/skyhanni/features/garden/GardenApi.kt`](https://github.com/hannibal002/skyhanni/blob/beta/src/main/java/at/hannibal2/skyhanni/features/garden/GardenApi.kt) (Domain Features), [`src/main/java/at/hannibal2/skyhanni/api/event/SkyHanniEvents.kt`](https://github.com/hannibal002/skyhanni/blob/beta/src/main/java/at/hannibal2/skyhanni/api/event/SkyHanniEvents.kt) (SkyHanni Event Bus), [`src/main/java/at/hannibal2/skyhanni/SkyHanniModLoader.kt`](https://github.com/hannibal002/skyhanni/blob/beta/src/main/java/at/hannibal2/skyhanni/SkyHanniModLoader.kt) (Feature Loader), [`src/main/resources/mixins.skyhanni.json`](https://github.com/hannibal002/skyhanni/blob/beta/src/main/resources/mixins.skyhanni.json) (Mixin Hooks)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Minecraft Integration"]
  node_minecraft["Minecraft Client<br/>host runtime"]
  node_fabric_metadata["Fabric Metadata<br/>mod descriptor<br/>[fabric.mod.json]"]
  node_bootstrap["Mod Bootstrap<br/>initializer<br/>[SkyHanniMod.kt]"]
  node_loader["Feature Loader<br/>registration"]
  node_mixins{{"Mixin Hooks<br/>integration boundary"}}
  node_mixin_plugin["Mixin Plugin<br/>class tweaker"]
  node_compat["Minecraft Compatibility<br/>compat abstraction<br/>[MinecraftCompat.kt]"]
end

subgraph group_core["Core Pipeline"]
  node_client_events["Client Event Adapters<br/>callback adapters<br/>[ClientEvents.kt]"]
  node_tick_events["Tick Events<br/>event adapters"]
  node_event_bus["SkyHanni Event Bus<br/>typed event core<br/>[SkyHanniEvents.kt]"]
  node_event_handlers["Event Handlers<br/>subscription API<br/>[EventHandler.kt]"]
  node_state[("SkyBlock State Extraction<br/>data managers<br/>[ScoreboardData.kt]")]
  node_hypixel_state["Hypixel State<br/>data manager<br/>[HypixelData.kt]"]
end

subgraph group_product["Product Systems"]
  node_features["Domain Features<br/>event-driven features<br/>[GardenApi.kt]"]
  node_config[("Configuration<br/>settings graph<br/>[SkyHanniConfig.kt]")]
  node_config_manager["Config Storage &amp; Migration<br/>persistence<br/>[ConfigManager.kt]"]
  node_commands["Commands<br/>command registry"]
  node_repo[("Remote Repository Data<br/>content manager")]
  node_external_repo["External Data Integration<br/>repository adapter"]
  node_rendering["Render Pipeline<br/>HUD and world rendering"]
  node_navigation["Navigation Paths<br/>graph routing<br/>[DijkstraTree.kt]"]
end

subgraph group_build["Build Tooling"]
  node_processor{{"Module Processor<br/>KSP processor<br/>[ModuleProcessor.kt]"}}
end

node_minecraft -->|"loads"| node_fabric_metadata
node_fabric_metadata -->|"declares entrypoint"| node_bootstrap
node_bootstrap -->|"initializes"| node_loader
node_processor -.->|"generates wiring for"| node_loader
node_minecraft -->|"is hooked by"| node_mixins
node_mixin_plugin -->|"configures"| node_mixins
node_mixins -->|"emits client signals"| node_client_events
node_minecraft -->|"drives"| node_tick_events
node_compat -.->|"abstracts client access"| node_client_events
node_client_events -->|"publishes"| node_event_bus
node_tick_events -->|"publishes"| node_event_bus
node_event_handlers -->|"subscribes through"| node_event_bus
node_event_bus -->|"feeds signals"| node_state
node_state -->|"derives"| node_hypixel_state
node_event_bus -->|"dispatches events"| node_features
node_hypixel_state -->|"provides interpreted state"| node_features
node_loader -->|"registers"| node_features
node_config -->|"controls"| node_features
node_config_manager -->|"loads and migrates"| node_config
node_commands -->|"edits"| node_config
node_features -->|"draws via"| node_rendering
node_repo -->|"supplies content"| node_features
node_external_repo -->|"integrates data"| node_repo
node_navigation -->|"renders routes through"| node_rendering

click node_fabric_metadata "https://github.com/hannibal002/skyhanni/blob/beta/versions/26.1/src/main/resources/fabric.mod.json"
click node_bootstrap "https://github.com/hannibal002/skyhanni/blob/beta/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt"
click node_loader "https://github.com/hannibal002/skyhanni/blob/beta/src/main/java/at/hannibal2/skyhanni/SkyHanniModLoader.kt"
click node_mixins "https://github.com/hannibal002/skyhanni/blob/beta/src/main/resources/mixins.skyhanni.json"
click node_mixin_plugin "https://github.com/hannibal002/skyhanni/blob/beta/src/main/java/at/hannibal2/skyhanni/mixins/init/SkyHanniMixinPlugin.java"
click node_compat "https://github.com/hannibal002/skyhanni/blob/beta/src/main/java/at/hannibal2/skyhanni/utils/compat/MinecraftCompat.kt"
click node_client_events "https://github.com/hannibal002/skyhanni/blob/beta/src/main/java/at/hannibal2/skyhanni/api/minecraftevents/ClientEvents.kt"
click node_tick_events "https://github.com/hannibal002/skyhanni/blob/beta/src/main/java/at/hannibal2/skyhanni/events/minecraft/SkyHanniTickEvents.kt"
click node_event_bus "https://github.com/hannibal002/skyhanni/blob/beta/src/main/java/at/hannibal2/skyhanni/api/event/SkyHanniEvents.kt"
click node_event_handlers "https://github.com/hannibal002/skyhanni/blob/beta/src/main/java/at/hannibal2/skyhanni/api/event/EventHandler.kt"
click node_state "https://github.com/hannibal002/skyhanni/blob/beta/src/main/java/at/hannibal2/skyhanni/data/ScoreboardData.kt"
click node_hypixel_state "https://github.com/hannibal002/skyhanni/blob/beta/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt"
click node_features "https://github.com/hannibal002/skyhanni/blob/beta/src/main/java/at/hannibal2/skyhanni/features/garden/GardenApi.kt"
click node_config "https://github.com/hannibal002/skyhanni/blob/beta/src/main/java/at/hannibal2/skyhanni/config/SkyHanniConfig.kt"
click node_config_manager "https://github.com/hannibal002/skyhanni/blob/beta/src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt"
click node_commands "https://github.com/hannibal002/skyhanni/blob/beta/src/main/java/at/hannibal2/skyhanni/config/commands/CommandsRegistry.kt"
click node_repo "https://github.com/hannibal002/skyhanni/blob/beta/src/main/java/at/hannibal2/skyhanni/data/repo/SkyHanniRepoManager.kt"
click node_external_repo "https://github.com/hannibal002/skyhanni/blob/beta/src/main/java/at/hannibal2/skyhanni/api/enoughupdates/EnoughUpdatesRepoManager.kt"
click node_rendering "https://github.com/hannibal002/skyhanni/blob/beta/src/main/java/at/hannibal2/skyhanni/utils/render/SkyHanniRenderPipeline.kt"
click node_navigation "https://github.com/hannibal002/skyhanni/blob/beta/src/main/java/at/hannibal2/skyhanni/data/model/graph/DijkstraTree.kt"
click node_processor "https://github.com/hannibal002/skyhanni/blob/beta/annotation-processors/src/main/kotlin/at/hannibal2/skyhanni/skyhannimodule/ModuleProcessor.kt"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_minecraft,node_fabric_metadata,node_bootstrap,node_loader,node_mixins,node_mixin_plugin,node_compat toneBlue
class node_client_events,node_tick_events,node_event_bus,node_event_handlers,node_state,node_hypixel_state toneAmber
class node_features,node_config,node_config_manager,node_commands,node_repo,node_external_repo,node_rendering,node_navigation toneMint
class node_processor toneRose
```

## Components

### Minecraft Integration

- **Minecraft Client**: host runtime · Fabric mod host and game internals.
- [Fabric Metadata](https://github.com/hannibal002/skyhanni/blob/beta/versions/26.1/src/main/resources/fabric.mod.json): mod descriptor · `versions/26.1/src/main/resources/fabric.mod.json`
- [Mod Bootstrap](https://github.com/hannibal002/skyhanni/blob/beta/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt): initializer · `src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt`
- [Feature Loader](https://github.com/hannibal002/skyhanni/blob/beta/src/main/java/at/hannibal2/skyhanni/SkyHanniModLoader.kt): registration · `src/main/java/at/hannibal2/skyhanni/SkyHanniModLoader.kt`
- [Mixin Hooks](https://github.com/hannibal002/skyhanni/blob/beta/src/main/resources/mixins.skyhanni.json): integration boundary · Observes and alters low-level client behavior. · `src/main/resources/mixins.skyhanni.json`
- [Mixin Plugin](https://github.com/hannibal002/skyhanni/blob/beta/src/main/java/at/hannibal2/skyhanni/mixins/init/SkyHanniMixinPlugin.java): class tweaker · `src/main/java/at/hannibal2/skyhanni/mixins/init/SkyHanniMixinPlugin.java`
- [Minecraft Compatibility](https://github.com/hannibal002/skyhanni/blob/beta/src/main/java/at/hannibal2/skyhanni/utils/compat/MinecraftCompat.kt): compat abstraction · `src/main/java/at/hannibal2/skyhanni/utils/compat/MinecraftCompat.kt`

### Core Pipeline

- [Client Event Adapters](https://github.com/hannibal002/skyhanni/blob/beta/src/main/java/at/hannibal2/skyhanni/api/minecraftevents/ClientEvents.kt): callback adapters · `src/main/java/at/hannibal2/skyhanni/api/minecraftevents/ClientEvents.kt`
- [Tick Events](https://github.com/hannibal002/skyhanni/blob/beta/src/main/java/at/hannibal2/skyhanni/events/minecraft/SkyHanniTickEvents.kt): event adapters · `src/main/java/at/hannibal2/skyhanni/events/minecraft/SkyHanniTickEvents.kt`
- [SkyHanni Event Bus](https://github.com/hannibal002/skyhanni/blob/beta/src/main/java/at/hannibal2/skyhanni/api/event/SkyHanniEvents.kt): typed event core · Decouples game hooks, state managers, and features. · `src/main/java/at/hannibal2/skyhanni/api/event/SkyHanniEvents.kt`
- [Event Handlers](https://github.com/hannibal002/skyhanni/blob/beta/src/main/java/at/hannibal2/skyhanni/api/event/EventHandler.kt): subscription API · `src/main/java/at/hannibal2/skyhanni/api/event/EventHandler.kt`
- [SkyBlock State Extraction](https://github.com/hannibal002/skyhanni/blob/beta/src/main/java/at/hannibal2/skyhanni/data/ScoreboardData.kt): data managers · Interprets game signals into SkyBlock state. · `src/main/java/at/hannibal2/skyhanni/data/ScoreboardData.kt`
- [Hypixel State](https://github.com/hannibal002/skyhanni/blob/beta/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt): data manager · `src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt`

### Product Systems

- [Domain Features](https://github.com/hannibal002/skyhanni/blob/beta/src/main/java/at/hannibal2/skyhanni/features/garden/GardenApi.kt): event-driven features · Configurable garden, mining, dungeon, and other SkyBlock features. · `src/main/java/at/hannibal2/skyhanni/features/garden/GardenApi.kt`
- [Configuration](https://github.com/hannibal002/skyhanni/blob/beta/src/main/java/at/hannibal2/skyhanni/config/SkyHanniConfig.kt): settings graph · `src/main/java/at/hannibal2/skyhanni/config/SkyHanniConfig.kt`
- [Config Storage & Migration](https://github.com/hannibal002/skyhanni/blob/beta/src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt): persistence · `src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt`
- [Commands](https://github.com/hannibal002/skyhanni/blob/beta/src/main/java/at/hannibal2/skyhanni/config/commands/CommandsRegistry.kt): command registry · Provides /sh and /skyhanni entry points. · `src/main/java/at/hannibal2/skyhanni/config/commands/CommandsRegistry.kt`
- [Remote Repository Data](https://github.com/hannibal002/skyhanni/blob/beta/src/main/java/at/hannibal2/skyhanni/data/repo/SkyHanniRepoManager.kt): content manager · Reloadable remote content separated from compiled code. · `src/main/java/at/hannibal2/skyhanni/data/repo/SkyHanniRepoManager.kt`
- [External Data Integration](https://github.com/hannibal002/skyhanni/blob/beta/src/main/java/at/hannibal2/skyhanni/api/enoughupdates/EnoughUpdatesRepoManager.kt): repository adapter · `src/main/java/at/hannibal2/skyhanni/api/enoughupdates/EnoughUpdatesRepoManager.kt`
- [Render Pipeline](https://github.com/hannibal002/skyhanni/blob/beta/src/main/java/at/hannibal2/skyhanni/utils/render/SkyHanniRenderPipeline.kt): HUD and world rendering · `src/main/java/at/hannibal2/skyhanni/utils/render/SkyHanniRenderPipeline.kt`
- [Navigation Paths](https://github.com/hannibal002/skyhanni/blob/beta/src/main/java/at/hannibal2/skyhanni/data/model/graph/DijkstraTree.kt): graph routing · Computes Dijkstra routes rendered in-world. · `src/main/java/at/hannibal2/skyhanni/data/model/graph/DijkstraTree.kt`

### Build Tooling

- [Module Processor](https://github.com/hannibal002/skyhanni/blob/beta/annotation-processors/src/main/kotlin/at/hannibal2/skyhanni/skyhannimodule/ModuleProcessor.kt): KSP processor · Generates module and version wiring. · `annotation-processors/src/main/kotlin/at/hannibal2/skyhanni/skyhannimodule/ModuleProcessor.kt`

## Connections

- Minecraft Client → Fabric Metadata: loads
- Fabric Metadata → Mod Bootstrap: declares entrypoint
- Mod Bootstrap → Feature Loader: initializes
- Module Processor → Feature Loader: generates wiring for
- Minecraft Client → Mixin Hooks: is hooked by
- Mixin Plugin → Mixin Hooks: configures
- Mixin Hooks → Client Event Adapters: emits client signals
- Minecraft Client → Tick Events: drives
- Minecraft Compatibility → Client Event Adapters: abstracts client access
- Client Event Adapters → SkyHanni Event Bus: publishes
- Tick Events → SkyHanni Event Bus: publishes
- Event Handlers → SkyHanni Event Bus: subscribes through
- SkyHanni Event Bus → SkyBlock State Extraction: feeds signals
- SkyBlock State Extraction → Hypixel State: derives
- SkyHanni Event Bus → Domain Features: dispatches events
- Hypixel State → Domain Features: provides interpreted state
- Feature Loader → Domain Features: registers
- Configuration → Domain Features: controls
- Config Storage & Migration → Configuration: loads and migrates
- Commands → Configuration: edits
- Domain Features → Render Pipeline: draws via
- Remote Repository Data → Domain Features: supplies content
- External Data Integration → Remote Repository Data: integrates data
- Navigation Paths → Render Pipeline: renders routes through
