# kdh8219/lambda architecture

> Architecture diagram of the GitHub repository kdh8219/lambda, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kdh8219/lambda
- Repository: https://github.com/kdh8219/lambda

## Overview

##### Main Components (Core Architecture)

a. Core System
- LambdaMod (Entry Point)
- LambdaCoreMod (Forge Mod Loading)
- ModuleManager (Module Management)
- PluginManager (Plugin System)
- EventBus System (LambdaEventBus)

b. Module Categories (Group these visually)
- Combat
- Render
- Movement
- Player
- Misc
- Client
- Chat

##### Key Architectural Layers

a. User Interface Layer
- ClickGUI
- HudGUI
- Command System
- Custom Font Renderer

b. Core Features Layer
- Module System
- Setting System
- Configuration Management
- Event System

c. Plugin Layer
- Plugin Loader
- Plugin API
- Plugin Lifecycle Management

d. Integration Layer
- Minecraft Hooks (via Mixins)
- Forge Integration
- Baritone Integration

##### Data Flow Representation

- Event propagation through the EventBus
- Command processing flow
- Module state changes
- Plugin loading sequence
- Configuration saving/loading

##### Implementation Details

Technical notes for:
- Mixin injection points
- Thread safety mechanisms
- Memory management
- Performance optimization points

##### User interface components

Remember to include version information and any critical dependencies in a notes section, as this is a Minecraft mod that needs to work with specific versions of Forge and Minecraft.

This structure will provide a clear understanding of how Lambda works as a utility mod while highlighting its plugin system and event-driven architecture.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Core["Core System"]
        LM[LambdaMod]:::core
        LCM[LambdaCoreMod]:::core
        MM[ModuleManager]:::core
        PM[PluginManager]:::core
        EB[LambdaEventBus]:::event
    end

    subgraph UI["User Interface Layer"]
        CG[ClickGUI]:::ui
        HG[HudGUI]:::ui
        FR[Font Renderer]:::ui
        CMD[Command System]:::ui
    end

    subgraph Modules["Module Categories"]
        Combat[Combat Modules]:::module
        Render[Render Modules]:::module
        Movement[Movement Modules]:::module
        Player[Player Modules]:::module
        Misc[Misc Modules]:::module
        Client[Client Modules]:::module
        Chat[Chat Modules]:::module
    end

    subgraph Plugin["Plugin System"]
        PL[Plugin Loader]:::plugin
        PA[Plugin API]:::plugin
        PLM[Plugin Lifecycle Manager]:::plugin
    end

    subgraph Config["Configuration System"]
        CM[Config Manager]:::config
        MC[Module Config]:::config
    end

    subgraph Integration["Integration Layer"]
        MB[Mixin Base]:::integration
        FI[Forge Integration]:::integration
        BI[Baritone Integration]:::integration
    end

    %% Core System Relationships
    LM --> LCM
    LM --> MM
    LM --> PM
    LM --> EB

    %% Module Manager Relationships
    MM --> Combat
    MM --> Render
    MM --> Movement
    MM --> Player
    MM --> Misc
    MM --> Client
    MM --> Chat

    %% Plugin System Relationships
    PM --> PL
    PL --> PA
    PL --> PLM

    %% Event System Relationships
    EB --> MM
    EB --> PM
    EB --> UI

    %% Configuration Relationships
    CM --> MC
    MC --> MM

    %% Integration Relationships
    LCM --> MB
    LCM --> FI
    FI --> BI

    %% UI Relationships
    CG --> MM
    HG --> MM
    CMD --> MM

    %% Style Definitions
    classDef core fill:#3498db,stroke:#2980b9,color:white
    classDef ui fill:#2ecc71,stroke:#27ae60,color:white
    classDef module fill:#95a5a6,stroke:#7f8c8d,color:white
    classDef plugin fill:#9b59b6,stroke:#8e44ad,color:white
    classDef event fill:#e67e22,stroke:#d35400,color:white
    classDef config fill:#f1c40f,stroke:#f39c12,color:black
    classDef integration fill:#e74c3c,stroke:#c0392b,color:white

    %% Click Events
    click LM "https://github.com/kdh8219/lambda/blob/main/src/main/kotlin/com/lambda/client/LambdaMod.kt"
    click LCM "https://github.com/kdh8219/lambda/blob/main/src/main/kotlin/com/lambda/client/LambdaCoreMod.kt"
    click MM "https://github.com/kdh8219/lambda/blob/main/src/main/kotlin/com/lambda/client/module/ModuleManager.kt"
    click PM "https://github.com/kdh8219/lambda/blob/main/src/main/kotlin/com/lambda/client/plugin/PluginManager.kt"
    click EB "https://github.com/kdh8219/lambda/blob/main/src/main/kotlin/com/lambda/client/event/LambdaEventBus.kt"
    click CG "https://github.com/kdh8219/lambda/blob/main/src/main/kotlin/com/lambda/client/gui/clickgui/LambdaClickGui.kt"
    click HG "https://github.com/kdh8219/lambda/blob/main/src/main/kotlin/com/lambda/client/gui/hudgui/LambdaHudGui.kt"
    click PL "https://github.com/kdh8219/lambda/blob/main/src/main/kotlin/com/lambda/client/plugin/PluginLoader.kt"
    click PA "https://github.com/kdh8219/lambda/blob/main/src/main/kotlin/com/lambda/client/plugin/api/Plugin.kt"
    click CM "https://github.com/kdh8219/lambda/blob/main/src/main/kotlin/com/lambda/client/setting/ConfigManager.kt"
    click MC "https://github.com/kdh8219/lambda/blob/main/src/main/kotlin/com/lambda/client/setting/ModuleConfig.kt"
    click MB "https://github.com/kdh8219/lambda/tree/main/src/main/java/com/lambda/mixin/"
    click FI "https://github.com/kdh8219/lambda/blob/main/src/main/kotlin/com/lambda/client/event/ForgeEventProcessor.kt"
    click BI "https://github.com/kdh8219/lambda/blob/main/src/main/java/com/lambda/mixin/baritone/MixinBaritoneSettings.java"
    click Combat "https://github.com/kdh8219/lambda/tree/main/src/main/kotlin/com/lambda/client/module/modules/combat/"
    click Render "https://github.com/kdh8219/lambda/tree/main/src/main/kotlin/com/lambda/client/module/modules/render/"
    click Movement "https://github.com/kdh8219/lambda/tree/main/src/main/kotlin/com/lambda/client/module/modules/movement/"
    click Player "https://github.com/kdh8219/lambda/tree/main/src/main/kotlin/com/lambda/client/module/modules/player/"
    click Misc "https://github.com/kdh8219/lambda/tree/main/src/main/kotlin/com/lambda/client/module/modules/misc/"
    click Client "https://github.com/kdh8219/lambda/tree/main/src/main/kotlin/com/lambda/client/module/modules/client/"
    click Chat "https://github.com/kdh8219/lambda/tree/main/src/main/kotlin/com/lambda/client/module/modules/chat/"
```
