# sh0kers/1441414-pgger architecture

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

- Interactive diagram: https://gitdiagram.com/sh0kers/1441414-pgger
- Repository: https://github.com/sh0kers/1441414-pgger

## Overview

This is a Fabric client mod that detects a newly placed dispenser after the player has recently held a TNT Cannon, then loads it with configured TNT and places a redstone block to trigger it. The principal flow is driven by the client tick: configuration and the H toggle gate AutoFill’s world scan and fill state machine. The README also documents live configuration reload and user-facing toggle/status messages. The sampled source supports the tick, configuration, scanning, inventory, and placement relationships; unsampled internal steps are represented within AutoFill rather than inferred as separate modules.

Main entry points: [`src/main/java/ru/holyworld/tntautofill/AutoFill.java`](https://github.com/sh0kers/1441414-pgger/blob/main/src/main/java/ru/holyworld/tntautofill/AutoFill.java) (Dispenser scanner), [`src/main/java/ru/holyworld/tntautofill/HolyWorldTntAutoFill.java`](https://github.com/sh0kers/1441414-pgger/blob/main/src/main/java/ru/holyworld/tntautofill/HolyWorldTntAutoFill.java) (Client initializer), [`src/main/java/ru/holyworld/tntautofill/Config.java`](https://github.com/sh0kers/1441414-pgger/blob/main/src/main/java/ru/holyworld/tntautofill/Config.java) (Config settings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Client runtime"]
  node_initializer["Client initializer"]
  node_toggle["H toggle"]
  node_chat["Chat messages"]
end

subgraph group_autofill["Auto-fill workflow"]
  node_scanner["Dispenser scanner<br/>[AutoFill.java]"]
  node_trigger_window["Cannon hold window<br/>[AutoFill.java]"]
  node_redstone_prep["Redstone preparation<br/>[AutoFill.java]"]
  node_dispenser_ui["Dispenser interface<br/>[AutoFill.java]"]
  node_tnt_fill["TNT loading<br/>[AutoFill.java]"]
  node_redstone_place["Redstone trigger<br/>[AutoFill.java]"]
end

subgraph group_config["Configuration"]
  node_config_model["Config settings<br/>[Config.java]"]
  node_config_file["Config file"]
end

node_player(("Player"))
node_minecraft["Minecraft client"]

node_minecraft -->|"runs client ticks"| node_initializer
node_initializer -->|"loads settings"| node_config_model
node_initializer -->|"registers key"| node_toggle
node_initializer -->|"ticks autofill"| node_scanner
node_player -->|"presses H"| node_toggle
node_toggle -->|"enables workflow"| node_scanner
node_toggle -->|"posts status"| node_chat
node_config_model -->|"reads and writes"| node_config_file
node_initializer -->|"polls reload"| node_config_model
node_scanner -->|"checks recent hold"| node_trigger_window
node_scanner -->|"prepares block"| node_redstone_prep
node_scanner -->|"opens dispenser"| node_dispenser_ui
node_dispenser_ui -->|"loads configured TNT"| node_tnt_fill
node_scanner -->|"places trigger"| node_redstone_place
node_tnt_fill -->|"then triggers cannon"| node_redstone_place
node_config_model -->|"supplies scan settings"| node_scanner
node_redstone_place -->|"reports completion"| node_chat
node_player -->|"places cannon"| node_scanner

click node_initializer "https://github.com/sh0kers/1441414-pgger/blob/main/src/main/java/ru/holyworld/tntautofill/HolyWorldTntAutoFill.java"
click node_toggle "https://github.com/sh0kers/1441414-pgger/blob/main/src/main/java/ru/holyworld/tntautofill/HolyWorldTntAutoFill.java"
click node_chat "https://github.com/sh0kers/1441414-pgger/blob/main/src/main/java/ru/holyworld/tntautofill/HolyWorldTntAutoFill.java"
click node_config_model "https://github.com/sh0kers/1441414-pgger/blob/main/src/main/java/ru/holyworld/tntautofill/Config.java"
click node_scanner "https://github.com/sh0kers/1441414-pgger/blob/main/src/main/java/ru/holyworld/tntautofill/AutoFill.java"
click node_trigger_window "https://github.com/sh0kers/1441414-pgger/blob/main/src/main/java/ru/holyworld/tntautofill/AutoFill.java"
click node_redstone_prep "https://github.com/sh0kers/1441414-pgger/blob/main/src/main/java/ru/holyworld/tntautofill/AutoFill.java"
click node_dispenser_ui "https://github.com/sh0kers/1441414-pgger/blob/main/src/main/java/ru/holyworld/tntautofill/AutoFill.java"
click node_tnt_fill "https://github.com/sh0kers/1441414-pgger/blob/main/src/main/java/ru/holyworld/tntautofill/AutoFill.java"
click node_redstone_place "https://github.com/sh0kers/1441414-pgger/blob/main/src/main/java/ru/holyworld/tntautofill/AutoFill.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_initializer,node_toggle,node_chat,node_minecraft toneBlue
class node_scanner,node_trigger_window,node_redstone_prep,node_dispenser_ui,node_tnt_fill,node_redstone_place toneAmber
class node_config_model,node_config_file toneMint
class node_player toneIndigo
```

## Components

### Client runtime

- [Client initializer](https://github.com/sh0kers/1441414-pgger/blob/main/src/main/java/ru/holyworld/tntautofill/HolyWorldTntAutoFill.java): `src/main/java/ru/holyworld/tntautofill/HolyWorldTntAutoFill.java`
- [H toggle](https://github.com/sh0kers/1441414-pgger/blob/main/src/main/java/ru/holyworld/tntautofill/HolyWorldTntAutoFill.java): `src/main/java/ru/holyworld/tntautofill/HolyWorldTntAutoFill.java`
- [Chat messages](https://github.com/sh0kers/1441414-pgger/blob/main/src/main/java/ru/holyworld/tntautofill/HolyWorldTntAutoFill.java): `src/main/java/ru/holyworld/tntautofill/HolyWorldTntAutoFill.java`

### Auto-fill workflow

- [Dispenser scanner](https://github.com/sh0kers/1441414-pgger/blob/main/src/main/java/ru/holyworld/tntautofill/AutoFill.java): `src/main/java/ru/holyworld/tntautofill/AutoFill.java`
- [Cannon hold window](https://github.com/sh0kers/1441414-pgger/blob/main/src/main/java/ru/holyworld/tntautofill/AutoFill.java): `src/main/java/ru/holyworld/tntautofill/AutoFill.java`
- [Redstone preparation](https://github.com/sh0kers/1441414-pgger/blob/main/src/main/java/ru/holyworld/tntautofill/AutoFill.java): `src/main/java/ru/holyworld/tntautofill/AutoFill.java`
- [Dispenser interface](https://github.com/sh0kers/1441414-pgger/blob/main/src/main/java/ru/holyworld/tntautofill/AutoFill.java): `src/main/java/ru/holyworld/tntautofill/AutoFill.java`
- [TNT loading](https://github.com/sh0kers/1441414-pgger/blob/main/src/main/java/ru/holyworld/tntautofill/AutoFill.java): `src/main/java/ru/holyworld/tntautofill/AutoFill.java`
- [Redstone trigger](https://github.com/sh0kers/1441414-pgger/blob/main/src/main/java/ru/holyworld/tntautofill/AutoFill.java): `src/main/java/ru/holyworld/tntautofill/AutoFill.java`

### Configuration

- [Config settings](https://github.com/sh0kers/1441414-pgger/blob/main/src/main/java/ru/holyworld/tntautofill/Config.java): `src/main/java/ru/holyworld/tntautofill/Config.java`
- **Config file**

### Other components

- **Player**
- **Minecraft client**

## Connections

- Minecraft client → Client initializer: runs client ticks (evidence: `src/main/java/ru/holyworld/tntautofill/HolyWorldTntAutoFill.java`)
- Client initializer → Config settings: loads settings (evidence: `src/main/java/ru/holyworld/tntautofill/HolyWorldTntAutoFill.java`)
- Client initializer → H toggle: registers key (evidence: `src/main/java/ru/holyworld/tntautofill/HolyWorldTntAutoFill.java`)
- Client initializer → Dispenser scanner: ticks autofill (evidence: `src/main/java/ru/holyworld/tntautofill/HolyWorldTntAutoFill.java`)
- Player → H toggle: presses H (evidence: `README.md`)
- H toggle → Dispenser scanner: enables workflow (evidence: `src/main/java/ru/holyworld/tntautofill/HolyWorldTntAutoFill.java`)
- H toggle → Chat messages: posts status (evidence: `src/main/java/ru/holyworld/tntautofill/HolyWorldTntAutoFill.java`)
- Config settings → Config file: reads and writes (evidence: `src/main/java/ru/holyworld/tntautofill/Config.java`)
- Client initializer → Config settings: polls reload (evidence: `src/main/java/ru/holyworld/tntautofill/HolyWorldTntAutoFill.java`)
- Dispenser scanner → Cannon hold window: checks recent hold (evidence: `README.md`)
- Dispenser scanner → Redstone preparation: prepares block (evidence: `src/main/java/ru/holyworld/tntautofill/AutoFill.java`)
- Dispenser scanner → Dispenser interface: opens dispenser (evidence: `src/main/java/ru/holyworld/tntautofill/AutoFill.java`)
- Dispenser interface → TNT loading: loads configured TNT (evidence: `src/main/java/ru/holyworld/tntautofill/AutoFill.java`)
- Dispenser scanner → Redstone trigger: places trigger (evidence: `src/main/java/ru/holyworld/tntautofill/AutoFill.java`)
- TNT loading → Redstone trigger: then triggers cannon (evidence: `README.md`)
- Config settings → Dispenser scanner: supplies scan settings (evidence: `README.md`)
- Redstone trigger → Chat messages: reports completion (evidence: `src/main/java/ru/holyworld/tntautofill/AutoFill.java`)
- Player → Dispenser scanner: places cannon (evidence: `README.md`)
