# mathiasyde/assemble architecture

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

## Overview

##### Main Components
- Core Mod Entry Point – The AssembleMod.java file acts as the entry point where the mod is initialized and registered.
- Block Components – There is an entire package devoted to Blocks (e.g., BronzeCauldronBlock, FluidVessel, HeaterBlock, and their associated BlockEntities and BlockItems). These classes represent different game objects the mod introduces.
- Data Models and Configurations – Files like Config.java and the datamodels (e.g., LitState.java) capture mod settings and state definitions used across the system.
- Mixins – The directory “mixin” shows that the mod uses mixin technology (e.g., FurnaceHeaterMixin.java) to tailor or modify base game behavior. This is especially important for adjusting or injecting new functionality into Minecraft’s vanilla classes.
- Resources and Assets – The “src/main/resources” folders include key resources such as the mods.toml (for mod metadata), assets (models, textures, language files), and data (recipes, tags). These elements drive how the mod integrates into the game’s data-driven systems.
- Build and Dependency Management – The Gradle build scripts (build.gradle, settings.gradle, gradle wrapper files) define how the mod is compiled and deployed within its development ecosystem.

##### Relationships and Interactions
- The core mod class (AssembleMod.java) acts as the orchestrator, initiating registration of all custom blocks, attaching configurations, and possibly linking the mixin components.
- Assets and recipes (found under assets and data directories) link indirectly to the custom game objects. They supply the visual and functional metadata required to render and interact with the objects in-game.

##### Architectural Patterns and Design Principles
- The mod follows a modular design where each piece (blocks, mixins, configuration, assets) is clearly separated.
- Dependency injection (or registration) patterns are visible in how the core mod initializes various components.
- Use of resource-driven configurations (mods.toml, recipes JSON, and model JSONs) means that much of the mod’s behavior and appearance is data-driven. This separation ensures that visual assets and block definitions can be updated independently of logic.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Application Core Layer
    subgraph "Application Core"
        A["AssembleMod.java"]:::core
    end

    %% Game Object Layer
    subgraph "Game Object Layer"
        B["Blocks (Custom Blocks, Entities, Items)"]:::block
    end

    %% Data Models & Configurations Layer
    subgraph "Data Models & Configurations"
        C["Config.java"]:::config
        D["Data Models (LitState, etc.)"]:::config
    end

    %% Mixin Layer
    subgraph "Mixin Layer"
        M["FurnaceHeaterMixin.java"]:::mixin
        E["Minecraft Engine"]:::external
    end

    %% Resources & Assets Layer
    subgraph "Resources & Assets"
        R1["mods.toml"]:::resource
        R2["Assets (Blockstates,Models,Textures,Lang)"]:::resource
        R3["Data (Recipes,Tags)"]:::resource
    end

    %% Build Layer
    subgraph "Build Layer"
        BG["build.gradle"]:::build
        BS["settings.gradle"]:::build
        BW["Gradle Wrapper Files"]:::build
    end

    %% Connections
    A -->|"registers"| B
    A -->|"loads"| C
    A -->|"loads"| D
    A -->|"integrates"| M
    A -->|"reads_metadata"| R1

    C -->|"configures"| B
    D -->|"defines"| B
    R2 -->|"defines"| B
    R3 -->|"supplies"| B

    M -->|"injects"| E

    BG -->|"builds"| A
    BS -->|"builds"| A
    BW -->|"supports"| A

    %% Click Events
    click A "https://github.com/mathiasyde/assemble/blob/main/src/main/java/com/mathiasyde/AssembleMod/AssembleMod.java"
    click B "https://github.com/mathiasyde/assemble/tree/main/src/main/java/com/mathiasyde/AssembleMod/Blocks"
    click C "https://github.com/mathiasyde/assemble/blob/main/src/main/java/com/mathiasyde/AssembleMod/Config.java"
    click D "https://github.com/mathiasyde/assemble/tree/main/src/main/java/com/mathiasyde/AssembleMod/Datamodels"
    click M "https://github.com/mathiasyde/assemble/tree/main/src/main/java/com/mathiasyde/AssembleMod/mixin"
    click R1 "https://github.com/mathiasyde/assemble/blob/main/src/main/resources/META-INF/mods.toml"
    click R2 "https://github.com/mathiasyde/assemble/tree/main/src/main/resources/assets/assemble"
    click R3 "https://github.com/mathiasyde/assemble/tree/main/src/main/resources/data/assemble"
    click BG "https://github.com/mathiasyde/assemble/blob/main/build.gradle"
    click BS "https://github.com/mathiasyde/assemble/blob/main/settings.gradle"
    click BW "https://github.com/mathiasyde/assemble/tree/main/gradle/wrapper"

    %% Styles
    classDef core fill:#ADD8E6,stroke:#000,stroke-width:2px;
    classDef block fill:#90EE90,stroke:#000,stroke-width:2px;
    classDef config fill:#FFB6C1,stroke:#000,stroke-width:2px;
    classDef mixin fill:#FFFF99,stroke:#000,stroke-width:2px;
    classDef resource fill:#FFD700,stroke:#000,stroke-width:2px;
    classDef build fill:#D3D3D3,stroke:#000,stroke-width:2px;
    classDef external fill:#FFA07A,stroke:#000,stroke-width:2px;
```
