# al1-gif/adg-mod architecture

> Architecture diagram of the GitHub repository al1-gif/adg-mod, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/al1-gif/adg-mod
- Repository: https://github.com/al1-gif/adg-mod

## Overview

ADG Mod is a Fabric Minecraft mod that vein-mines connected configured blocks when a player breaks one. Initialization registers the block-break listener; the handler checks player, tool, and configuration rules, scans the surrounding blocks, then applies the configured mining behavior. Configuration is loaded from and saved to a JSON file, and an optional Mod Menu integration exposes settings. The README gives no further product detail; edges reflect only the sampled source.

Main entry points: [`src/main/java/com/shuuphe/adgmod/ADGMiner.java`](https://github.com/al1-gif/adg-mod/blob/master/src/main/java/com/shuuphe/adgmod/ADGMiner.java) (Vein miner), [`src/main/java/com/shuuphe/adgmod/config/ADGModConfig.java`](https://github.com/al1-gif/adg-mod/blob/master/src/main/java/com/shuuphe/adgmod/config/ADGModConfig.java) (Mod configuration), [`src/main/java/com/shuuphe/adgmod/config/ModMenuIntegration.java`](https://github.com/al1-gif/adg-mod/blob/master/src/main/java/com/shuuphe/adgmod/config/ModMenuIntegration.java) (Settings screen), [`src/main/java/com/shuuphe/adgmod/ADGMod.java`](https://github.com/al1-gif/adg-mod/blob/master/src/main/java/com/shuuphe/adgmod/ADGMod.java) (Mod initializer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Mining runtime"]
  node_adg_mod["Mod initializer<br/>[ADGMod.java]"]
  node_miner["Vein miner<br/>[ADGMiner.java]"]
end

subgraph group_settings["Configuration"]
  node_config["Mod configuration<br/>[ADGModConfig.java]"]
  node_menu_integration["Settings screen"]
end

node_player(("Player"))
node_fabric_event{{"Block-break event"}}
node_minecraft_world["Minecraft world"]
node_config_file["Config JSON"]
node_mod_menu["Mod Menu"]

node_adg_mod -->|"registers listener"| node_miner
node_miner -->|"registers callback"| node_fabric_event
node_player -.->|"breaks block"| node_fabric_event
node_fabric_event -->|"dispatches callback"| node_miner
node_miner -->|"loads settings"| node_config
node_miner -->|"scans and mines"| node_minecraft_world
node_config -->|"loads and saves"| node_config_file
node_mod_menu -.->|"opens settings"| node_menu_integration
node_menu_integration -->|"edits and saves"| node_config

click node_adg_mod "https://github.com/al1-gif/adg-mod/blob/master/src/main/java/com/shuuphe/adgmod/ADGMod.java"
click node_miner "https://github.com/al1-gif/adg-mod/blob/master/src/main/java/com/shuuphe/adgmod/ADGMiner.java"
click node_config "https://github.com/al1-gif/adg-mod/blob/master/src/main/java/com/shuuphe/adgmod/config/ADGModConfig.java"
click node_menu_integration "https://github.com/al1-gif/adg-mod/blob/master/src/main/java/com/shuuphe/adgmod/config/ModMenuIntegration.java"

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_adg_mod,node_miner toneBlue
class node_config,node_menu_integration toneAmber
class node_player,node_fabric_event,node_minecraft_world,node_config_file,node_mod_menu toneIndigo
```

## Components

### Mining runtime

- [Mod initializer](https://github.com/al1-gif/adg-mod/blob/master/src/main/java/com/shuuphe/adgmod/ADGMod.java): `src/main/java/com/shuuphe/adgmod/ADGMod.java`
- [Vein miner](https://github.com/al1-gif/adg-mod/blob/master/src/main/java/com/shuuphe/adgmod/ADGMiner.java): `src/main/java/com/shuuphe/adgmod/ADGMiner.java`

### Configuration

- [Mod configuration](https://github.com/al1-gif/adg-mod/blob/master/src/main/java/com/shuuphe/adgmod/config/ADGModConfig.java): `src/main/java/com/shuuphe/adgmod/config/ADGModConfig.java`
- [Settings screen](https://github.com/al1-gif/adg-mod/blob/master/src/main/java/com/shuuphe/adgmod/config/ModMenuIntegration.java): `src/main/java/com/shuuphe/adgmod/config/ModMenuIntegration.java`

### Other components

- **Player**
- **Block-break event**
- **Minecraft world**
- **Config JSON**
- **Mod Menu**

## Connections

- Mod initializer → Vein miner: registers listener (evidence: `src/main/java/com/shuuphe/adgmod/ADGMod.java`)
- Vein miner → Block-break event: registers callback (evidence: `src/main/java/com/shuuphe/adgmod/ADGMiner.java`)
- Player → Block-break event: breaks block
- Block-break event → Vein miner: dispatches callback (evidence: `src/main/java/com/shuuphe/adgmod/ADGMiner.java`)
- Vein miner → Mod configuration: loads settings (evidence: `src/main/java/com/shuuphe/adgmod/ADGMiner.java`)
- Vein miner → Minecraft world: scans and mines (evidence: `src/main/java/com/shuuphe/adgmod/ADGMiner.java`)
- Mod configuration → Config JSON: loads and saves (evidence: `src/main/java/com/shuuphe/adgmod/config/ADGModConfig.java`)
- Mod Menu → Settings screen: opens settings
- Settings screen → Mod configuration: edits and saves (evidence: `src/main/java/com/shuuphe/adgmod/config/ModMenuIntegration.java`)
