# acedrdd/ace-mod architecture

> Architecture diagram of the GitHub repository acedrdd/ace-mod, 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/acedrdd/ace-mod
- Repository: https://github.com/acedrdd/ace-mod

## Overview

Ace Cull is a native Minecraft Bedrock mod with two runtime capabilities: entity culling and periodic RAM optimization. The user configures them in the launcher’s in-game Mod Menu. The culling workflow waits for the game library, locates and verifies the render callback, installs a detour, then skips rendering entities beyond the configured distance. A crash guard can keep culling disabled after repeated early exits. The excerpts show the culling and configuration logic; RAM optimization details are documented in the README but its implementation was not sampled.

Main entry points: [`AceCull.cpp`](https://github.com/acedrdd/ace-mod/blob/main/AceCull.cpp) (Ace Cull Module), [`AceConfig.hpp`](https://github.com/acedrdd/ace-mod/blob/main/AceConfig.hpp) (Cull Configuration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_settings["Settings"]
  node_mod["Ace Cull Module<br/>[AceCull.cpp]"]
  node_config["Cull Configuration<br/>[AceConfig.hpp]"]
end

subgraph group_culling["Entity Culling"]
  node_installer["Hook Installer<br/>[AceCull.cpp]"]
  node_scanner["Memory Scanner<br/>[AceCull.cpp]"]
  node_verifier["Offset Verifier<br/>[AceCull.cpp]"]
  node_detour["Cull Detour<br/>[AceCull.cpp]"]
end

subgraph group_runtime["Runtime Safeguards"]
  node_ram["RAM Optimizer<br/>[AceCull.cpp]"]
  node_guard["Crash Guard<br/>[AceCull.cpp]"]
end

node_user(("Player"))
node_modmenu["Mod Menu"]
node_gamecallback["Render Callback"]
node_android["Android Memory"]

node_user -->|"configures"| node_modmenu
node_modmenu -->|"sets options"| node_mod
node_mod -->|"loads settings"| node_config
node_mod -->|"starts install"| node_installer
node_installer -->|"scans memory"| node_scanner
node_installer -->|"checks offsets"| node_verifier
node_installer -->|"hooks callback"| node_gamecallback
node_gamecallback -->|"dispatches"| node_detour
node_detour -->|"calls original"| node_gamecallback
node_mod -->|"applies distance"| node_detour
node_mod -->|"configures interval"| node_ram
node_ram -->|"returns memory"| node_android
node_mod -->|"tracks early exits"| node_guard
node_guard -->|"gates culling"| node_installer

click node_mod "https://github.com/acedrdd/ace-mod/blob/main/AceCull.cpp"
click node_config "https://github.com/acedrdd/ace-mod/blob/main/AceConfig.hpp"
click node_installer "https://github.com/acedrdd/ace-mod/blob/main/AceCull.cpp"
click node_scanner "https://github.com/acedrdd/ace-mod/blob/main/AceCull.cpp"
click node_verifier "https://github.com/acedrdd/ace-mod/blob/main/AceCull.cpp"
click node_detour "https://github.com/acedrdd/ace-mod/blob/main/AceCull.cpp"
click node_ram "https://github.com/acedrdd/ace-mod/blob/main/AceCull.cpp"
click node_guard "https://github.com/acedrdd/ace-mod/blob/main/AceCull.cpp"

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_mod,node_config toneBlue
class node_installer,node_scanner,node_verifier,node_detour toneAmber
class node_ram,node_guard toneMint
class node_user,node_modmenu,node_gamecallback,node_android toneIndigo
```

## Components

### Settings

- [Ace Cull Module](https://github.com/acedrdd/ace-mod/blob/main/AceCull.cpp): `AceCull.cpp`
- [Cull Configuration](https://github.com/acedrdd/ace-mod/blob/main/AceConfig.hpp): `AceConfig.hpp`

### Entity Culling

- [Hook Installer](https://github.com/acedrdd/ace-mod/blob/main/AceCull.cpp): `AceCull.cpp`
- [Memory Scanner](https://github.com/acedrdd/ace-mod/blob/main/AceCull.cpp): `AceCull.cpp`
- [Offset Verifier](https://github.com/acedrdd/ace-mod/blob/main/AceCull.cpp): `AceCull.cpp`
- [Cull Detour](https://github.com/acedrdd/ace-mod/blob/main/AceCull.cpp): `AceCull.cpp`

### Runtime Safeguards

- [RAM Optimizer](https://github.com/acedrdd/ace-mod/blob/main/AceCull.cpp): `AceCull.cpp`
- [Crash Guard](https://github.com/acedrdd/ace-mod/blob/main/AceCull.cpp): `AceCull.cpp`

### Other components

- **Player**
- **Mod Menu**
- **Render Callback**
- **Android Memory**

## Connections

- Player → Mod Menu: configures (evidence: `README.md`)
- Mod Menu → Ace Cull Module: sets options (evidence: `AceCull.cpp`)
- Ace Cull Module → Cull Configuration: loads settings (evidence: `AceCull.cpp`)
- Ace Cull Module → Hook Installer: starts install (evidence: `AceCull.cpp`)
- Hook Installer → Memory Scanner: scans memory (evidence: `AceCull.cpp`)
- Hook Installer → Offset Verifier: checks offsets (evidence: `AceCull.cpp`)
- Hook Installer → Render Callback: hooks callback (evidence: `AceCull.cpp`)
- Render Callback → Cull Detour: dispatches (evidence: `AceCull.cpp`)
- Cull Detour → Render Callback: calls original (evidence: `AceCull.cpp`)
- Ace Cull Module → Cull Detour: applies distance (evidence: `AceCull.cpp`)
- Ace Cull Module → RAM Optimizer: configures interval (evidence: `README.md`)
- RAM Optimizer → Android Memory: returns memory (evidence: `README.md`)
- Ace Cull Module → Crash Guard: tracks early exits (evidence: `README.md`)
- Crash Guard → Hook Installer: gates culling (evidence: `README.md`)
