# shadows-of-fire/apotheosis architecture

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

- Interactive diagram: https://gitdiagram.com/shadows-of-fire/apotheosis
- Repository: https://github.com/shadows-of-fire/apotheosis

## Overview

This project is a Minecraft mod called “Apotheosis” – a content‐expansion mod that layers extra features on top of vanilla Minecraft. It is built using Gradle and organized in a modular fashion where each core feature (or “module”) is separated into its own package or set of resources. The README explains the various modules offered (Enchanting, Spawner, Deadly, Potion, Village, Garden), and the file tree confirms this modular structure with dedicated directories for data, assets, code, and mixins.

##### Main Components Identification
- Core Mod Entry Point: Include the main classes (such as Apoth.java and Apotheosis.java) that serve as the mod’s entry point and initialize all the modules.
- Modules (each represented as a separate component):
– Enchanting Module (including its sub-module for anvils): Enhances the enchanting system with extra enchantments, uncapped tables, and anvils that can be enchanted.
– Spawner Module: Modifies mob spawners, adds customization of spawner types, and integrates with spawn eggs.
– Deadly Module: Introduces boss monsters and rogue spawners, along with unique loot and event triggers.
– Potion Module: Provides new potion recipes and additional potion effects.
– Village Module: Changes wandering trader behavior and extends the use of the fletching table.
– Garden Module: Enhances crops (cactus, sugar cane, bamboo) and provides additional animal-related tools.
- Shared Components and Framework Integrations:
– Data Providers and JSON Files: Shown in the large “src/generated/resources/data/apotheosis” directory containing loot tables, recipes, advancements, and other game data.
– Assets and Resources: Resources such as textures, models, sounds, and patchouli books that integrate with the core Minecraft engine.
– Mixins & Compatibility: The “mixin” packages and related compatibility classes (for JEI, Patchouli, curios, etc.) that modify or hook into base game classes.
– Communication: Networking code (e.g., in the net package) and event listeners (in the event package) for passing data between game events and mod behavior.
– Utility Classes: Helpers, registries, commands, and configurations to support modular operations.

##### Relationships and Interactions
- Dependencies between the game’s data layer (JSON resource files, loot tables, recipes, and tag definitions) and the code components (data providers) that read and process them.

##### Architectural Patterns and Design Principles
- Data-driven architecture: The project’s extensive use of JSON and other resource files demonstrates that the mod heavily relies on external data to drive game content. Indicate this data flow.
– Presentation/Assets Layer (textures, models, sound, patchouli books).
– Logic Layer (modules and their subpackages: enchanting, spawner, mob, loot, recipe, socket, etc.).
– Data/Configuration Layer (JSON data, resource definitions, and configuration files).

##### Specific Technologies and Frameworks
- Minecraft Forge API (or another mod loader): Represent the hook into the vanilla game.
- Gradle: Shown as the build system that compiles and packages the mod.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% External Systems
    subgraph "External Systems"
        ME["Minecraft Engine"]:::subsystem
        Gradle["Gradle Build System"]:::subsystem
        Forge["Minecraft Forge API"]:::subsystem
        MixinFW["Mixin Framework"]:::subsystem
    end

    %% Core Layer
    subgraph "Core Layer"
        Core["Core Mod Entry Point"]:::core
    end

    %% Modules Layer
    subgraph "Modules Layer"
        subgraph "Enchanting Module"
            EnchCode["Enchanting Module (Code)"]:::module
            EnchDocs["Enchanting Module (Patchouli Docs)"]:::asset
        end
        Spawner["Spawner Module"]:::module
        Deadly["Deadly Module"]:::module
        Potion["Potion Module"]:::module
        Village["Village Module"]:::asset
        Garden["Garden Module"]:::asset
    end

    %% Supporting Components
    subgraph "Supporting Components"
        subgraph "Communication"
            Net["Networking"]:::comm
            Events["Event Listeners"]:::comm
        end
        Utility["Utility Classes"]:::util
        Mixins["Mixins & Compatibility"]:::mixin
    end

    %% Data/Presentation Layer
    subgraph "Data/Presentation Layer"
        subgraph "Data Resources"
            DataGen["Generated JSON Data"]:::data
            DataMain["Main JSON Data"]:::data
        end
        Assets["Assets & Resources"]:::asset
    end

    %% External Systems to Core
    Gradle --> Core
    ME --> Core

    %% Forge and Mixin interactions
    Forge --> Mixins
    MixinFW --> Mixins
    Forge --> Events

    %% Core to Modules and Supporting Components
    Core --> EnchCode
    Core --> Spawner
    Core --> Deadly
    Core --> Potion
    Core --> Village
    Core --> Garden
    Core --> Net
    Core --> Events
    Core --> Utility
    Mixins --> Core

    %% Enchanting Module internal connection
    EnchCode --> EnchDocs

    %% Data Resources to Modules
    DataGen --> EnchCode
    DataMain --> EnchCode
    DataGen --- Potion
    DataMain --- Potion
    DataGen --- Deadly
    DataMain --- Deadly

    %% Assets to Docs and Presentation Modules
    Assets --> EnchDocs
    Assets --> Village
    Assets --> Garden

    %% Click Events
    click Core "https://github.com/shadows-of-fire/apotheosis/blob/1.21/src/main/java/dev/shadowsoffire/apotheosis/Apoth.java"
    click EnchCode "https://github.com/shadows-of-fire/apotheosis/tree/1.21/src/main/java/dev/shadowsoffire/apotheosis/affix"
    click EnchDocs "https://github.com/shadows-of-fire/apotheosis/tree/1.21/src/main/resources/assets/apotheosis/patchouli_books/apoth_chronicle/en_us/categories/enchanting"
    click Spawner "https://github.com/shadows-of-fire/apotheosis/tree/1.21/src/main/java/dev/shadowsoffire/apotheosis/spawner"
    click Deadly "https://github.com/shadows-of-fire/apotheosis/tree/1.21/src/main/java/dev/shadowsoffire/apotheosis/mobs"
    click Potion "https://github.com/shadows-of-fire/apotheosis/blob/1.21/src/main/java/dev/shadowsoffire/apotheosis/recipe/PotionCharmRecipe.java"
    click Village "https://github.com/shadows-of-fire/apotheosis/tree/1.21/src/main/resources/assets/apotheosis/patchouli_books/apoth_chronicle/en_us/categories/village"
    click Garden "https://github.com/shadows-of-fire/apotheosis/tree/1.21/src/main/resources/assets/apotheosis/patchouli_books/apoth_chronicle/en_us/categories/garden"
    click DataGen "https://github.com/shadows-of-fire/apotheosis/tree/1.21/src/generated/resources/data/apotheosis"
    click DataMain "https://github.com/shadows-of-fire/apotheosis/tree/1.21/src/main/resources/data/apotheosis"
    click Assets "https://github.com/shadows-of-fire/apotheosis/tree/1.21/src/main/resources/assets/apotheosis"
    click Mixins "https://github.com/shadows-of-fire/apotheosis/tree/1.21/src/main/java/dev/shadowsoffire/apotheosis/mixin"
    click Net "https://github.com/shadows-of-fire/apotheosis/tree/1.21/src/main/java/dev/shadowsoffire/apotheosis/net"
    click Events "https://github.com/shadows-of-fire/apotheosis/tree/1.21/src/main/java/dev/shadowsoffire/apotheosis/event"
    click Utility "https://github.com/shadows-of-fire/apotheosis/tree/1.21/src/main/java/dev/shadowsoffire/apotheosis/util"

    %% Styles
    classDef core fill:#FAD7A0,stroke:#D35400,stroke-width:2px;
    classDef module fill:#AED6F1,stroke:#2471A3,stroke-width:2px;
    classDef subsystem fill:#A9DFBF,stroke:#229954,stroke-width:2px;
    classDef data fill:#F9E79F,stroke:#F1C40F,stroke-width:2px;
    classDef asset fill:#D2B4DE,stroke:#8E44AD,stroke-width:2px;
    classDef mixin fill:#F5B7B1,stroke:#C0392B,stroke-width:2px;
    classDef comm fill:#FADBD8,stroke:#E74C3C,stroke-width:2px;
    classDef util fill:#D5F5E3,stroke:#27AE60,stroke-width:2px;
```
