# frqnny/mostructures architecture

> Architecture diagram of the GitHub repository frqnny/mostructures, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/frqnny/mostructures
- Repository: https://github.com/frqnny/mostructures

## Overview

Mo’ Structures is a Minecraft mod that adds world-generated structures, mini-dungeons, and related gameplay behavior. The principal workflow is platform startup into shared initialization and registration, followed by Minecraft world generation consulting structure placement/configuration and generating structure content. Datapack resources define structure templates, pools, biome eligibility, and loot; custom processors vary placed blocks. Configuration controls activation and placement spacing. The source index supports the registration and config links shown; resource-to-runtime wiring and several mixin effects are not established by excerpts, so those links are omitted or marked unverified.

Main entry points: [`common/src/main/java/io/github/frqnny/mostructures/MoStructures.java`](https://github.com/frqnny/mostructures/blob/1.21.x/common/src/main/java/io/github/frqnny/mostructures/MoStructures.java) (Shared Initialization), [`common/src/main/java/io/github/frqnny/mostructures/init/ProcessorTypes.java`](https://github.com/frqnny/mostructures/blob/1.21.x/common/src/main/java/io/github/frqnny/mostructures/init/ProcessorTypes.java) (Processor Registration), [`common/src/main/java/io/github/frqnny/mostructures/structure/ModStructurePlacement.java`](https://github.com/frqnny/mostructures/blob/1.21.x/common/src/main/java/io/github/frqnny/mostructures/structure/ModStructurePlacement.java) (Structure Placement), [`common/src/main/java/io/github/frqnny/mostructures/init/Structures.java`](https://github.com/frqnny/mostructures/blob/1.21.x/common/src/main/java/io/github/frqnny/mostructures/init/Structures.java) (Structure Registration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_startup["Startup and Configuration"]
  node_fabric["Fabric Adapter"]
  node_neo["NeoForge Adapter"]
  node_common["Shared Initialization<br/>[MoStructures.java]"]
  node_config["Structure Settings"]
  node_configentry["Setting Entry"]
end

subgraph group_worldgen["World Generation"]
  node_registry["Structure Registration<br/>[Structures.java]"]
  node_placement["Structure Placement"]
  node_structure["Structure Generation<br/>[ModStructure.java]"]
  node_processorregistry["Processor Registration"]
  node_stoneproc["Stone Variation"]
  node_cobbleproc["Cobblestone Variation"]
end

subgraph group_content["Structure Content"]
  node_biomes["Biome Eligibility"]
  node_pools["Template Pools"]
  node_templates["Structure Templates"]
  node_loot["Loot Tables"]
end

subgraph group_gameplay["Gameplay Hooks"]
  node_lakehook["Lake Generation Hook"]
  node_livinghook["Living Entity Hook"]
  node_rabbit["Rabbit Hook"]
  node_itemutils["Item Utilities<br/>[ItemUtils.java]"]
end

node_player(("Minecraft Player"))
node_minecraft(("Minecraft Runtime"))

node_fabric -->|"initializes"| node_common
node_neo -->|"initializes"| node_common
node_common -->|"registers processors"| node_processorregistry
node_common -->|"registers structures"| node_registry
node_common -->|"registers config"| node_config
node_config -->|"creates entries"| node_configentry
node_placement -->|"reads settings"| node_config
node_placement -->|"reads values"| node_configentry
node_placement -->|"gets placement type"| node_registry
node_structure -->|"gets structure type"| node_registry
node_processorregistry -->|"registers codec"| node_stoneproc
node_processorregistry -->|"registers codec"| node_cobbleproc
node_stoneproc -->|"gets processor type"| node_processorregistry
node_cobbleproc -->|"gets processor type"| node_processorregistry
node_lakehook -->|"checks structure tag"| node_registry
node_livinghook -->|"uses utilities"| node_itemutils
node_player -.->|"plays in"| node_minecraft
node_minecraft -.->|"checks placement"| node_placement
node_minecraft -.->|"generates structures"| node_structure
node_minecraft -.->|"uses eligibility data"| node_biomes
node_minecraft -.->|"loads pools"| node_pools
node_minecraft -.->|"loads templates"| node_templates
node_minecraft -.->|"loads loot"| node_loot
node_minecraft -.->|"applies processor"| node_stoneproc
node_minecraft -.->|"applies processor"| node_cobbleproc

click node_fabric "https://github.com/frqnny/mostructures/blob/1.21.x/fabric/src/main/java/io/github/frqnny/mostructures/fabric/MoStructuresFabric.java"
click node_neo "https://github.com/frqnny/mostructures/blob/1.21.x/neoforge/src/main/java/io/github/frqnny/mostructures/neoforge/MoStructuresNeoForge.java"
click node_common "https://github.com/frqnny/mostructures/blob/1.21.x/common/src/main/java/io/github/frqnny/mostructures/MoStructures.java"
click node_config "https://github.com/frqnny/mostructures/blob/1.21.x/common/src/main/java/io/github/frqnny/mostructures/config/MoStructuresConfig.java"
click node_configentry "https://github.com/frqnny/mostructures/blob/1.21.x/common/src/main/java/io/github/frqnny/mostructures/config/StructureConfigEntry.java"
click node_registry "https://github.com/frqnny/mostructures/blob/1.21.x/common/src/main/java/io/github/frqnny/mostructures/init/Structures.java"
click node_placement "https://github.com/frqnny/mostructures/blob/1.21.x/common/src/main/java/io/github/frqnny/mostructures/structure/ModStructurePlacement.java"
click node_structure "https://github.com/frqnny/mostructures/blob/1.21.x/common/src/main/java/io/github/frqnny/mostructures/structure/ModStructure.java"
click node_biomes "https://github.com/frqnny/mostructures/tree/1.21.x/common/src/main/resources/data/mostructures/tags/worldgen/biome/has_structure"
click node_pools "https://github.com/frqnny/mostructures/tree/1.21.x/common/src/main/resources/data/mostructures/worldgen/template_pool"
click node_templates "https://github.com/frqnny/mostructures/tree/1.21.x/common/src/main/resources/data/mostructures/structure"
click node_loot "https://github.com/frqnny/mostructures/tree/1.21.x/common/src/main/resources/data/mostructures/loot_table"
click node_processorregistry "https://github.com/frqnny/mostructures/blob/1.21.x/common/src/main/java/io/github/frqnny/mostructures/init/ProcessorTypes.java"
click node_stoneproc "https://github.com/frqnny/mostructures/blob/1.21.x/common/src/main/java/io/github/frqnny/mostructures/processor/SimpleStoneStructureProcessor.java"
click node_cobbleproc "https://github.com/frqnny/mostructures/blob/1.21.x/common/src/main/java/io/github/frqnny/mostructures/processor/SimpleCobblestoneProcessor.java"
click node_lakehook "https://github.com/frqnny/mostructures/blob/1.21.x/common/src/main/java/io/github/frqnny/mostructures/mixin/LakeFeatureMixin.java"
click node_livinghook "https://github.com/frqnny/mostructures/blob/1.21.x/common/src/main/java/io/github/frqnny/mostructures/mixin/MixinLivingEntity.java"
click node_rabbit "https://github.com/frqnny/mostructures/blob/1.21.x/common/src/main/java/io/github/frqnny/mostructures/mixin/MixinRabbitEntity.java"
click node_itemutils "https://github.com/frqnny/mostructures/blob/1.21.x/common/src/main/java/io/github/frqnny/mostructures/util/ItemUtils.java"

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_fabric,node_neo,node_common,node_config,node_configentry toneBlue
class node_registry,node_placement,node_structure,node_processorregistry,node_stoneproc,node_cobbleproc toneAmber
class node_biomes,node_pools,node_templates,node_loot toneMint
class node_lakehook,node_livinghook,node_rabbit,node_itemutils toneRose
class node_player,node_minecraft toneIndigo
```

## Components

### Startup and Configuration

- [Fabric Adapter](https://github.com/frqnny/mostructures/blob/1.21.x/fabric/src/main/java/io/github/frqnny/mostructures/fabric/MoStructuresFabric.java): `fabric/src/main/java/io/github/frqnny/mostructures/fabric/MoStructuresFabric.java`
- [NeoForge Adapter](https://github.com/frqnny/mostructures/blob/1.21.x/neoforge/src/main/java/io/github/frqnny/mostructures/neoforge/MoStructuresNeoForge.java): `neoforge/src/main/java/io/github/frqnny/mostructures/neoforge/MoStructuresNeoForge.java`
- [Shared Initialization](https://github.com/frqnny/mostructures/blob/1.21.x/common/src/main/java/io/github/frqnny/mostructures/MoStructures.java): `common/src/main/java/io/github/frqnny/mostructures/MoStructures.java`
- [Structure Settings](https://github.com/frqnny/mostructures/blob/1.21.x/common/src/main/java/io/github/frqnny/mostructures/config/MoStructuresConfig.java): `common/src/main/java/io/github/frqnny/mostructures/config/MoStructuresConfig.java`
- [Setting Entry](https://github.com/frqnny/mostructures/blob/1.21.x/common/src/main/java/io/github/frqnny/mostructures/config/StructureConfigEntry.java): `common/src/main/java/io/github/frqnny/mostructures/config/StructureConfigEntry.java`

### World Generation

- [Structure Registration](https://github.com/frqnny/mostructures/blob/1.21.x/common/src/main/java/io/github/frqnny/mostructures/init/Structures.java): `common/src/main/java/io/github/frqnny/mostructures/init/Structures.java`
- [Structure Placement](https://github.com/frqnny/mostructures/blob/1.21.x/common/src/main/java/io/github/frqnny/mostructures/structure/ModStructurePlacement.java): `common/src/main/java/io/github/frqnny/mostructures/structure/ModStructurePlacement.java`
- [Structure Generation](https://github.com/frqnny/mostructures/blob/1.21.x/common/src/main/java/io/github/frqnny/mostructures/structure/ModStructure.java): `common/src/main/java/io/github/frqnny/mostructures/structure/ModStructure.java`
- [Processor Registration](https://github.com/frqnny/mostructures/blob/1.21.x/common/src/main/java/io/github/frqnny/mostructures/init/ProcessorTypes.java): `common/src/main/java/io/github/frqnny/mostructures/init/ProcessorTypes.java`
- [Stone Variation](https://github.com/frqnny/mostructures/blob/1.21.x/common/src/main/java/io/github/frqnny/mostructures/processor/SimpleStoneStructureProcessor.java): `common/src/main/java/io/github/frqnny/mostructures/processor/SimpleStoneStructureProcessor.java`
- [Cobblestone Variation](https://github.com/frqnny/mostructures/blob/1.21.x/common/src/main/java/io/github/frqnny/mostructures/processor/SimpleCobblestoneProcessor.java): `common/src/main/java/io/github/frqnny/mostructures/processor/SimpleCobblestoneProcessor.java`

### Structure Content

- [Biome Eligibility](https://github.com/frqnny/mostructures/tree/1.21.x/common/src/main/resources/data/mostructures/tags/worldgen/biome/has_structure): `common/src/main/resources/data/mostructures/tags/worldgen/biome/has_structure`
- [Template Pools](https://github.com/frqnny/mostructures/tree/1.21.x/common/src/main/resources/data/mostructures/worldgen/template_pool): `common/src/main/resources/data/mostructures/worldgen/template_pool`
- [Structure Templates](https://github.com/frqnny/mostructures/tree/1.21.x/common/src/main/resources/data/mostructures/structure): `common/src/main/resources/data/mostructures/structure`
- [Loot Tables](https://github.com/frqnny/mostructures/tree/1.21.x/common/src/main/resources/data/mostructures/loot_table): `common/src/main/resources/data/mostructures/loot_table`

### Gameplay Hooks

- [Lake Generation Hook](https://github.com/frqnny/mostructures/blob/1.21.x/common/src/main/java/io/github/frqnny/mostructures/mixin/LakeFeatureMixin.java): `common/src/main/java/io/github/frqnny/mostructures/mixin/LakeFeatureMixin.java`
- [Living Entity Hook](https://github.com/frqnny/mostructures/blob/1.21.x/common/src/main/java/io/github/frqnny/mostructures/mixin/MixinLivingEntity.java): `common/src/main/java/io/github/frqnny/mostructures/mixin/MixinLivingEntity.java`
- [Rabbit Hook](https://github.com/frqnny/mostructures/blob/1.21.x/common/src/main/java/io/github/frqnny/mostructures/mixin/MixinRabbitEntity.java): `common/src/main/java/io/github/frqnny/mostructures/mixin/MixinRabbitEntity.java`
- [Item Utilities](https://github.com/frqnny/mostructures/blob/1.21.x/common/src/main/java/io/github/frqnny/mostructures/util/ItemUtils.java): `common/src/main/java/io/github/frqnny/mostructures/util/ItemUtils.java`

### Other components

- **Minecraft Player**
- **Minecraft Runtime**

## Connections

- Fabric Adapter → Shared Initialization: initializes (evidence: `fabric/src/main/java/io/github/frqnny/mostructures/fabric/MoStructuresFabric.java`)
- NeoForge Adapter → Shared Initialization: initializes (evidence: `neoforge/src/main/java/io/github/frqnny/mostructures/neoforge/MoStructuresNeoForge.java`)
- Shared Initialization → Processor Registration: registers processors (evidence: `common/src/main/java/io/github/frqnny/mostructures/MoStructures.java`)
- Shared Initialization → Structure Registration: registers structures (evidence: `common/src/main/java/io/github/frqnny/mostructures/MoStructures.java`)
- Shared Initialization → Structure Settings: registers config (evidence: `common/src/main/java/io/github/frqnny/mostructures/MoStructures.java`)
- Structure Settings → Setting Entry: creates entries (evidence: `common/src/main/java/io/github/frqnny/mostructures/config/MoStructuresConfig.java`)
- Structure Placement → Structure Settings: reads settings (evidence: `common/src/main/java/io/github/frqnny/mostructures/structure/ModStructurePlacement.java`)
- Structure Placement → Setting Entry: reads values (evidence: `common/src/main/java/io/github/frqnny/mostructures/structure/ModStructurePlacement.java`)
- Structure Placement → Structure Registration: gets placement type (evidence: `common/src/main/java/io/github/frqnny/mostructures/structure/ModStructurePlacement.java`)
- Structure Generation → Structure Registration: gets structure type (evidence: `common/src/main/java/io/github/frqnny/mostructures/structure/ModStructure.java`)
- Processor Registration → Stone Variation: registers codec (evidence: `common/src/main/java/io/github/frqnny/mostructures/init/ProcessorTypes.java`)
- Processor Registration → Cobblestone Variation: registers codec (evidence: `common/src/main/java/io/github/frqnny/mostructures/init/ProcessorTypes.java`)
- Stone Variation → Processor Registration: gets processor type (evidence: `common/src/main/java/io/github/frqnny/mostructures/processor/SimpleStoneStructureProcessor.java`)
- Cobblestone Variation → Processor Registration: gets processor type (evidence: `common/src/main/java/io/github/frqnny/mostructures/processor/SimpleCobblestoneProcessor.java`)
- Lake Generation Hook → Structure Registration: checks structure tag (evidence: `common/src/main/java/io/github/frqnny/mostructures/mixin/LakeFeatureMixin.java`)
- Living Entity Hook → Item Utilities: uses utilities (evidence: `common/src/main/java/io/github/frqnny/mostructures/mixin/MixinLivingEntity.java`)
- Minecraft Player → Minecraft Runtime: plays in
- Minecraft Runtime → Structure Placement: checks placement
- Minecraft Runtime → Structure Generation: generates structures
- Minecraft Runtime → Biome Eligibility: uses eligibility data
- Minecraft Runtime → Template Pools: loads pools
- Minecraft Runtime → Structure Templates: loads templates
- Minecraft Runtime → Loot Tables: loads loot
- Minecraft Runtime → Stone Variation: applies processor
- Minecraft Runtime → Cobblestone Variation: applies processor
