# gitbrou/minecraft-tweaker architecture

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

- Interactive diagram: https://gitdiagram.com/gitbrou/minecraft-tweaker
- Repository: https://github.com/gitbrou/minecraft-tweaker

## Overview

Minecraft Tweaker is a Python Minecraft overlay client: it locates the game window, runs a frame loop, and draws ESP, HUD, GUI, and registered extensions. The README also describes loading an agent into the JVM, but the sampled excerpts do not show that agent’s runtime path. The platform backends and several indexed core modules are represented, though their internal call details were not inspected; edges are limited to documented or indexed relationships.

Main entry points: [`minecraft_tweaks/app.py`](https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/app.py) (App frame loop), [`minecraft_tweaks/process.py`](https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/process.py) (Game window lookup), [`minecraft_tweaks/draw.py`](https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/draw.py) (Canvas drawing), [`minecraft_tweaks/watchdog.py`](https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/watchdog.py) (Watchdog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Client runtime"]
  node_watchdog["Watchdog<br/>[watchdog.py]"]
  node_app["App frame loop<br/>[app.py]"]
  node_process["Game window lookup<br/>[process.py]"]
  node_agent["JVM agent<br/>[agent.py]"]
  node_hooks["Lifecycle hooks<br/>[hooks.py]"]
  node_autostart["Autostart<br/>[autostart.py]"]
  node_exports["Public API<br/>[__init__.py]"]
end

subgraph group_render["Overlay rendering"]
  node_overlay["Overlay selector<br/>[overlay.py]"]
  node_canvas["Canvas drawing<br/>[draw.py]"]
  node_esp["ESP renderer<br/>[esp.py]"]
  node_gui["Click GUI<br/>[gui.py]"]
  node_paint["Paint helpers<br/>[paint.py]"]
  node_png["PNG support<br/>[png.py]"]
  node_animation["Animation helpers<br/>[anim.py]"]
end

subgraph group_platform["Platform backends"]
  node_win_process["Windows process scan<br/>[_process_win.py]"]
  node_x11_process["X11 process scan<br/>[_process_x11.py]"]
  node_win_overlay["Windows overlay<br/>[_overlay_win.py]"]
  node_x11_overlay["X11 overlay<br/>[_overlay_x11.py]"]
  node_input["Platform input<br/>[_input.py]"]
  node_win_api["Win32 bindings<br/>[_win.py]"]
  node_x11_api["X11 bindings<br/>[_x11.py]"]
end

subgraph group_custom["Customization"]
  node_extensions["Extension registry<br/>[extensions.py]"]
  node_keys["Hotkeys<br/>[keys.py]"]
end

node_user(("Client user"))

node_user -->|"starts client"| node_watchdog
node_watchdog -->|"finds game"| node_process
node_watchdog -->|"starts app"| node_app
node_watchdog -->|"configures startup"| node_autostart
node_process -->|"selects Windows"| node_win_process
node_process -->|"selects Linux"| node_x11_process
node_app -->|"runs overlay loop"| node_overlay
node_app -->|"draws entities"| node_esp
node_app -->|"draws HUD"| node_canvas
node_app -->|"draws menu"| node_gui
node_app -->|"dispatches hooks"| node_extensions
node_app -->|"reads controls"| node_keys
node_overlay -->|"selects Windows"| node_win_overlay
node_overlay -->|"selects Linux"| node_x11_overlay
node_win_overlay -->|"presents buffer"| node_canvas
node_x11_overlay -->|"presents buffer"| node_canvas
node_keys -->|"reads input"| node_input
node_input -->|"uses bindings"| node_win_api
node_input -->|"uses bindings"| node_x11_api
node_win_process -.->|"uses bindings"| node_win_api
node_x11_process -.->|"uses bindings"| node_x11_api
node_agent -->|"uses lookup"| node_process
node_hooks -->|"uses lookup"| node_process
node_hooks -->|"uses overlay"| node_overlay
node_extensions -->|"registers ESP"| node_esp
node_extensions -->|"registers drawing"| node_canvas
node_extensions -->|"registers modules"| node_gui
node_paint -->|"uses primitives"| node_canvas
node_exports -->|"exports app"| node_app
node_exports -->|"exports hooks"| node_hooks
node_exports -->|"exports agent"| node_agent

click node_watchdog "https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/watchdog.py"
click node_app "https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/app.py"
click node_process "https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/process.py"
click node_win_process "https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/_process_win.py"
click node_x11_process "https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/_process_x11.py"
click node_agent "https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/agent.py"
click node_hooks "https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/hooks.py"
click node_overlay "https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/overlay.py"
click node_win_overlay "https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/_overlay_win.py"
click node_x11_overlay "https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/_overlay_x11.py"
click node_canvas "https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/draw.py"
click node_esp "https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/esp.py"
click node_gui "https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/gui.py"
click node_paint "https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/paint.py"
click node_png "https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/png.py"
click node_animation "https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/anim.py"
click node_extensions "https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/extensions.py"
click node_keys "https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/keys.py"
click node_input "https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/_input.py"
click node_autostart "https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/autostart.py"
click node_win_api "https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/_win.py"
click node_x11_api "https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/_x11.py"
click node_exports "https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/__init__.py"

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_watchdog,node_app,node_process,node_agent,node_hooks,node_autostart,node_exports,node_user toneBlue
class node_overlay,node_canvas,node_esp,node_gui,node_paint,node_png,node_animation toneAmber
class node_win_process,node_x11_process,node_win_overlay,node_x11_overlay,node_input,node_win_api,node_x11_api toneMint
class node_extensions,node_keys toneRose
```

## Components

### Client runtime

- [Watchdog](https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/watchdog.py): `minecraft_tweaks/watchdog.py`
- [App frame loop](https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/app.py): `minecraft_tweaks/app.py`
- [Game window lookup](https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/process.py): `minecraft_tweaks/process.py`
- [JVM agent](https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/agent.py): `minecraft_tweaks/agent.py`
- [Lifecycle hooks](https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/hooks.py): `minecraft_tweaks/hooks.py`
- [Autostart](https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/autostart.py): `minecraft_tweaks/autostart.py`
- [Public API](https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/__init__.py): `minecraft_tweaks/__init__.py`

### Overlay rendering

- [Overlay selector](https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/overlay.py): `minecraft_tweaks/overlay.py`
- [Canvas drawing](https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/draw.py): `minecraft_tweaks/draw.py`
- [ESP renderer](https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/esp.py): `minecraft_tweaks/esp.py`
- [Click GUI](https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/gui.py): `minecraft_tweaks/gui.py`
- [Paint helpers](https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/paint.py): `minecraft_tweaks/paint.py`
- [PNG support](https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/png.py): `minecraft_tweaks/png.py`
- [Animation helpers](https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/anim.py): `minecraft_tweaks/anim.py`

### Platform backends

- [Windows process scan](https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/_process_win.py): `minecraft_tweaks/_process_win.py`
- [X11 process scan](https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/_process_x11.py): `minecraft_tweaks/_process_x11.py`
- [Windows overlay](https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/_overlay_win.py): `minecraft_tweaks/_overlay_win.py`
- [X11 overlay](https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/_overlay_x11.py): `minecraft_tweaks/_overlay_x11.py`
- [Platform input](https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/_input.py): `minecraft_tweaks/_input.py`
- [Win32 bindings](https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/_win.py): `minecraft_tweaks/_win.py`
- [X11 bindings](https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/_x11.py): `minecraft_tweaks/_x11.py`

### Customization

- [Extension registry](https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/extensions.py): `minecraft_tweaks/extensions.py`
- [Hotkeys](https://github.com/gitbrou/minecraft-tweaker/blob/main/minecraft_tweaks/keys.py): `minecraft_tweaks/keys.py`

### Other components

- **Client user**

## Connections

- Client user → Watchdog: starts client (evidence: `minecraft_tweaks/watchdog.py`)
- Watchdog → Game window lookup: finds game (evidence: `minecraft_tweaks/watchdog.py`)
- Watchdog → App frame loop: starts app (evidence: `minecraft_tweaks/watchdog.py`)
- Watchdog → Autostart: configures startup (evidence: `minecraft_tweaks/watchdog.py`)
- Game window lookup → Windows process scan: selects Windows (evidence: `minecraft_tweaks/process.py`)
- Game window lookup → X11 process scan: selects Linux (evidence: `minecraft_tweaks/process.py`)
- App frame loop → Overlay selector: runs overlay loop (evidence: `minecraft_tweaks/app.py`)
- App frame loop → ESP renderer: draws entities (evidence: `minecraft_tweaks/app.py`)
- App frame loop → Canvas drawing: draws HUD (evidence: `minecraft_tweaks/app.py`)
- App frame loop → Click GUI: draws menu (evidence: `minecraft_tweaks/app.py`)
- App frame loop → Extension registry: dispatches hooks (evidence: `minecraft_tweaks/app.py`)
- App frame loop → Hotkeys: reads controls (evidence: `minecraft_tweaks/app.py`)
- Overlay selector → Windows overlay: selects Windows (evidence: `minecraft_tweaks/overlay.py`)
- Overlay selector → X11 overlay: selects Linux (evidence: `minecraft_tweaks/overlay.py`)
- Windows overlay → Canvas drawing: presents buffer (evidence: `minecraft_tweaks/_overlay_win.py`)
- X11 overlay → Canvas drawing: presents buffer (evidence: `minecraft_tweaks/_overlay_x11.py`)
- Hotkeys → Platform input: reads input (evidence: `minecraft_tweaks/keys.py`)
- Platform input → Win32 bindings: uses bindings (evidence: `minecraft_tweaks/_input.py`)
- Platform input → X11 bindings: uses bindings (evidence: `minecraft_tweaks/_input.py`)
- Windows process scan → Win32 bindings: uses bindings (evidence: `minecraft_tweaks/_process_win.py`)
- X11 process scan → X11 bindings: uses bindings (evidence: `minecraft_tweaks/_process_x11.py`)
- JVM agent → Game window lookup: uses lookup (evidence: `minecraft_tweaks/agent.py`)
- Lifecycle hooks → Game window lookup: uses lookup (evidence: `minecraft_tweaks/hooks.py`)
- Lifecycle hooks → Overlay selector: uses overlay (evidence: `minecraft_tweaks/hooks.py`)
- Extension registry → ESP renderer: registers ESP (evidence: `minecraft_tweaks/extensions.py`)
- Extension registry → Canvas drawing: registers drawing (evidence: `minecraft_tweaks/extensions.py`)
- Extension registry → Click GUI: registers modules (evidence: `minecraft_tweaks/extensions.py`)
- Paint helpers → Canvas drawing: uses primitives (evidence: `minecraft_tweaks/paint.py`)
- Public API → App frame loop: exports app (evidence: `minecraft_tweaks/__init__.py`)
- Public API → Lifecycle hooks: exports hooks (evidence: `minecraft_tweaks/__init__.py`)
- Public API → JVM agent: exports agent (evidence: `minecraft_tweaks/__init__.py`)
