# portablejim/veinminermodsupport architecture

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

- Interactive diagram: https://gitdiagram.com/portablejim/veinminermodsupport
- Repository: https://github.com/portablejim/veinminermodsupport

## Overview

This project, “VeinMiner Mod Support,” is a Minecraft mod extension designed to improve and expand the support for the VeinMiner mod by integrating additional functionalities for various Minecraft tool-based mods (such as Dartcraft, Tinkers Construct, Ex Nihilo, and Ex Aliquo). The overall system is structured to interface with existing APIs and provide enhanced mod behavior during gameplay.

##### Main Components
- External API Integrations:
- The external-apis folder (under external-apis/portablejim/veinminer/api) contains key API interface definitions (e.g., Permission.java, VeinminerHarvestFailedCheck.java) which are potentially provided by the VeinMiner mod author.
- Internal API Implementations:
- The src/api directory is split into packages for different functionality:
- “bluedart” package in src/api/java/bluedart/api (e.g., IBreakable.java) that may define interfaces or behaviors required for additional mod/tool interactions.
- “portablejim” package under src/api/java/portablejim/veinminer/api mirrors the external API definitions, possibly for internal consistency or extension.
- Core Mod Support Module:
- The main logic resides in the src/main/java/portablejim/veinminermodsupport folder (e.g., VeinMinerModSupport.java and ModInfo.java). This is where the integration logic is implemented, bridging between the core VeinMiner mod and additional mods.
- Resources and Metadata:
- The src/main/resources directory contains configuration and metadata files (like mcmod.info and version.properties) which are necessary for proper mod loading and version management in Minecraft.

##### Relationships and Interactions
- The External API Components define the contracts and interface specifications that the internal APIs and the mod support core must adhere to.
- The internal API layer likely adapts or augments these external interfaces to support additional features (e.g., auto-smelt, auto-repair) for the respective mods.
- The core mod support module (in src/main) acts as the central orchestrator:
- It consumes the API definitions from both the external and internal API layers.
- It integrates specific mod functionalities (e.g., handling Dartcraft tool repairs or Tinkers Construct auto-smelt operations) based on event triggers or tool usages during gameplay.
- Build and deployment are handled via Gradle (build.gradle, gradlew scripts, and gradle wrapper files).

##### Architectural Patterns and Key Technologies
- Layered Architecture:
- The structure exhibits a clear separation of concerns: API definitions, internal implementations, and the integration module are distinct layers.
- Adapter/Bridge Patterns:
- The internal API packages likely serve as adapters to bridge the external VeinMiner API with extended functionality (supporting additional mods).
- Modular Design for Extensibility:
- By splitting support for different mods (Dartcraft, Tinkers, etc.) into discreet components, the system remains extensible and maintainable.
- Use of Gradle for build and dependency management reinforces a standard modern Java build process.

##### Concluding Details
- Finally, emphasize how the architecture supports additional functionalities (e.g., auto-repair, auto-smelt) by showcasing the points where the core mod support component interfaces with the respective tool/method checks as specified by the API (visible in sources like VeinminerHarvestFailedCheck.java, etc.).

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "API Layers"
        extAPI["External API Definitions"]:::external
        internalBluedart["Internal API: Bluedart"]:::internal
        internalPortableJim["Internal API: PortableJim"]:::internal
    end

    subgraph "Core Integration"
        modSupport["Core Mod Support"]:::core
        resources["Resources & Metadata"]:::resources
        gradle["Gradle Build System"]:::build
    end

    subgraph "External Mods"
        externalMods["External Mods (Dartcraft, Tinkers, Ex Nihilo, Ex Aliquo)"]:::modExt
    end

    %% Relationships
    extAPI -->|"interfaces"| internalBluedart
    extAPI -->|"interfaces"| internalPortableJim
    internalBluedart -->|"adapted_by"| modSupport
    internalPortableJim -->|"adapted_by"| modSupport
    resources -->|"configures"| modSupport
    gradle -->|"builds"| modSupport
    modSupport -->|"integrates"| externalMods

    %% Click Events
    click extAPI "https://github.com/portablejim/veinminermodsupport/tree/master/external-apis/portablejim/veinminer/api"
    click internalBluedart "https://github.com/portablejim/veinminermodsupport/blob/master/src/api/java/bluedart/api/IBreakable.java"
    click internalPortableJim "https://github.com/portablejim/veinminermodsupport/tree/master/src/api/java/portablejim/veinminer/api"
    click modSupport "https://github.com/portablejim/veinminermodsupport/tree/master/src/main/java/portablejim/veinminermodsupport"
    click resources "https://github.com/portablejim/veinminermodsupport/tree/master/src/main/resources"

    %% Styles
    classDef external fill:#ffcccc,stroke:#990000,stroke-width:2px;
    classDef internal fill:#ccccff,stroke:#333399,stroke-width:2px;
    classDef core fill:#ccffcc,stroke:#009900,stroke-width:2px;
    classDef resources fill:#ffffcc,stroke:#999900,stroke-width:2px;
    classDef build fill:#e0e0e0,stroke:#666666,stroke-width:2px;
    classDef modExt fill:#cceeff,stroke:#336699,stroke-width:2px;
```
