# cookfishsev/mirebound architecture

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

- Interactive diagram: https://gitdiagram.com/cookfishsev/mirebound
- Repository: https://github.com/cookfishsev/mirebound

## Overview

Mirebound is a Minecraft quicksand gameplay mod: players encounter sinking terrain, experience configurable movement and struggle effects, accumulate mud contamination, and see those effects rendered on players, equipment, entities, and the environment. The repository also includes adaptive conversion of existing blocks, terrain-generation tools, tuning controls, and event-like systems such as eruptions and assimilation. The graph reflects the README and available tree; excerpts only confirm some runtime calls and data transfers, so uncertain wiring between broader subsystems is left out.

Main entry points: [`src/main/java/com/fish/mirebound/client/ClientNetworkHandlers.java`](https://github.com/cookfishsev/mirebound/blob/main/src/main/java/com/fish/mirebound/client/ClientNetworkHandlers.java) (Client network handlers), [`src/main/java/com/fish/mirebound/mud/MudPlayerPhysicsController.java`](https://github.com/cookfishsev/mirebound/blob/main/src/main/java/com/fish/mirebound/mud/MudPlayerPhysicsController.java) (Sinking physics), [`src/main/java/com/fish/mirebound/coverage/MudCoverageService.java`](https://github.com/cookfishsev/mirebound/blob/main/src/main/java/com/fish/mirebound/coverage/MudCoverageService.java) (Player contamination), [`src/main/java/com/fish/mirebound/client/ClientMudState.java`](https://github.com/cookfishsev/mirebound/blob/main/src/main/java/com/fish/mirebound/client/ClientMudState.java) (Player mud visuals)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_gameplay["Gameplay physics"]
  node_physics["Sinking physics"]
  node_assimilation["Assimilation"]
end

subgraph group_coverage["Mud coverage"]
  node_mudcoverage["Player contamination"]
  node_entitycoverage["Entity contamination"]
  node_equipment["Equipment staining"]
  node_skinrules["Skin stain rules<br/>[SkinStainMask.java]"]
end

subgraph group_terrain["Terrain systems"]
  node_adaptive["Adaptive mud conversion"]
  node_adaptivestore[("Source block store")]
  node_generation["Terrain generation"]
  node_tuning["Mud tuning"]
end

subgraph group_client["Client presentation"]
  node_clientnetwork["Client network handlers"]
  node_clientmud["Player mud visuals"]
  node_entityvisuals["Entity mud visuals"]
  node_render["Mud rendering"]
  node_armorrender["Armor rendering<br/>[ArmorMudLayer.java]"]
end

subgraph group_events["Events and tools"]
  node_events["Mud eruptions"]
  node_mudwork["Mudwork items"]
  node_commands["Mud commands<br/>[MudCommands.java]"]
end

node_player(("Player / world"))

node_player -->|"enters mud"| node_physics
node_physics -->|"checks state"| node_assimilation
node_physics -->|"tracks contact"| node_mudcoverage
node_mudcoverage -->|"persists state"| node_player
node_mudcoverage -->|"sends coverage"| node_clientnetwork
node_entitycoverage -->|"sends entity coverage"| node_clientnetwork
node_clientnetwork -->|"updates state"| node_clientmud
node_clientnetwork -->|"updates state"| node_entityvisuals
node_clientmud -->|"supplies appearance"| node_render
node_clientmud -->|"supplies coverage"| node_armorrender
node_entityvisuals -->|"supplies spots"| node_render
node_player -->|"reports contacts"| node_equipment
node_equipment -->|"updates item data"| node_player
node_player -->|"edits mask"| node_skinrules
node_adaptive -->|"stores source"| node_adaptivestore
node_tuning -->|"converts blocks"| node_adaptive
node_player -->|"tunes mud"| node_tuning
node_player -->|"requests terrain"| node_generation
node_player -->|"encounters eruption"| node_events
node_player -->|"uses item"| node_mudwork
node_player -->|"runs command"| node_commands

click node_physics "https://github.com/cookfishsev/mirebound/blob/main/src/main/java/com/fish/mirebound/mud/MudPlayerPhysicsController.java"
click node_assimilation "https://github.com/cookfishsev/mirebound/blob/main/src/main/java/com/fish/mirebound/assimilation/AssimilationSystem.java"
click node_mudcoverage "https://github.com/cookfishsev/mirebound/blob/main/src/main/java/com/fish/mirebound/coverage/MudCoverageService.java"
click node_entitycoverage "https://github.com/cookfishsev/mirebound/blob/main/src/main/java/com/fish/mirebound/entitycoverage/EntityMudCoverageService.java"
click node_equipment "https://github.com/cookfishsev/mirebound/blob/main/src/main/java/com/fish/mirebound/coverage/armor/EquipmentSurfaceService.java"
click node_skinrules "https://github.com/cookfishsev/mirebound/blob/main/src/main/java/com/fish/mirebound/coverage/skin/SkinStainMask.java"
click node_adaptive "https://github.com/cookfishsev/mirebound/blob/main/src/main/java/com/fish/mirebound/adaptive/AdaptiveMudService.java"
click node_adaptivestore "https://github.com/cookfishsev/mirebound/blob/main/src/main/java/com/fish/mirebound/adaptive/AdaptiveMudSourceStore.java"
click node_generation "https://github.com/cookfishsev/mirebound/blob/main/src/main/java/com/fish/mirebound/generation/MudTerrainGenerationManager.java"
click node_tuning "https://github.com/cookfishsev/mirebound/blob/main/src/main/java/com/fish/mirebound/mud/tuning/MudTuningManager.java"
click node_clientnetwork "https://github.com/cookfishsev/mirebound/blob/main/src/main/java/com/fish/mirebound/client/ClientNetworkHandlers.java"
click node_clientmud "https://github.com/cookfishsev/mirebound/blob/main/src/main/java/com/fish/mirebound/client/ClientMudState.java"
click node_entityvisuals "https://github.com/cookfishsev/mirebound/blob/main/src/main/java/com/fish/mirebound/client/entitycoverage/ClientEntityMudCoverage.java"
click node_render "https://github.com/cookfishsev/mirebound/blob/main/src/main/java/com/fish/mirebound/client/MudSurfaceEffectRenderer.java"
click node_armorrender "https://github.com/cookfishsev/mirebound/blob/main/src/main/java/com/fish/mirebound/client/ArmorMudLayer.java"
click node_events "https://github.com/cookfishsev/mirebound/blob/main/src/main/java/com/fish/mirebound/eruption/MudEruptionSystem.java"
click node_mudwork "https://github.com/cookfishsev/mirebound/blob/main/src/main/java/com/fish/mirebound/content/mudwork/MudBallProjectile.java"
click node_commands "https://github.com/cookfishsev/mirebound/blob/main/src/main/java/com/fish/mirebound/command/MudCommands.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_physics,node_assimilation toneBlue
class node_mudcoverage,node_entitycoverage,node_equipment,node_skinrules toneAmber
class node_adaptive,node_adaptivestore,node_generation,node_tuning toneMint
class node_clientnetwork,node_clientmud,node_entityvisuals,node_render,node_armorrender toneRose
class node_events,node_mudwork,node_commands,node_player toneIndigo
```

## Components

### Gameplay physics

- [Sinking physics](https://github.com/cookfishsev/mirebound/blob/main/src/main/java/com/fish/mirebound/mud/MudPlayerPhysicsController.java): `src/main/java/com/fish/mirebound/mud/MudPlayerPhysicsController.java`
- [Assimilation](https://github.com/cookfishsev/mirebound/blob/main/src/main/java/com/fish/mirebound/assimilation/AssimilationSystem.java): `src/main/java/com/fish/mirebound/assimilation/AssimilationSystem.java`

### Mud coverage

- [Player contamination](https://github.com/cookfishsev/mirebound/blob/main/src/main/java/com/fish/mirebound/coverage/MudCoverageService.java): `src/main/java/com/fish/mirebound/coverage/MudCoverageService.java`
- [Entity contamination](https://github.com/cookfishsev/mirebound/blob/main/src/main/java/com/fish/mirebound/entitycoverage/EntityMudCoverageService.java): `src/main/java/com/fish/mirebound/entitycoverage/EntityMudCoverageService.java`
- [Equipment staining](https://github.com/cookfishsev/mirebound/blob/main/src/main/java/com/fish/mirebound/coverage/armor/EquipmentSurfaceService.java): `src/main/java/com/fish/mirebound/coverage/armor/EquipmentSurfaceService.java`
- [Skin stain rules](https://github.com/cookfishsev/mirebound/blob/main/src/main/java/com/fish/mirebound/coverage/skin/SkinStainMask.java): `src/main/java/com/fish/mirebound/coverage/skin/SkinStainMask.java`

### Terrain systems

- [Adaptive mud conversion](https://github.com/cookfishsev/mirebound/blob/main/src/main/java/com/fish/mirebound/adaptive/AdaptiveMudService.java): `src/main/java/com/fish/mirebound/adaptive/AdaptiveMudService.java`
- [Source block store](https://github.com/cookfishsev/mirebound/blob/main/src/main/java/com/fish/mirebound/adaptive/AdaptiveMudSourceStore.java): `src/main/java/com/fish/mirebound/adaptive/AdaptiveMudSourceStore.java`
- [Terrain generation](https://github.com/cookfishsev/mirebound/blob/main/src/main/java/com/fish/mirebound/generation/MudTerrainGenerationManager.java): `src/main/java/com/fish/mirebound/generation/MudTerrainGenerationManager.java`
- [Mud tuning](https://github.com/cookfishsev/mirebound/blob/main/src/main/java/com/fish/mirebound/mud/tuning/MudTuningManager.java): `src/main/java/com/fish/mirebound/mud/tuning/MudTuningManager.java`

### Client presentation

- [Client network handlers](https://github.com/cookfishsev/mirebound/blob/main/src/main/java/com/fish/mirebound/client/ClientNetworkHandlers.java): `src/main/java/com/fish/mirebound/client/ClientNetworkHandlers.java`
- [Player mud visuals](https://github.com/cookfishsev/mirebound/blob/main/src/main/java/com/fish/mirebound/client/ClientMudState.java): `src/main/java/com/fish/mirebound/client/ClientMudState.java`
- [Entity mud visuals](https://github.com/cookfishsev/mirebound/blob/main/src/main/java/com/fish/mirebound/client/entitycoverage/ClientEntityMudCoverage.java): `src/main/java/com/fish/mirebound/client/entitycoverage/ClientEntityMudCoverage.java`
- [Mud rendering](https://github.com/cookfishsev/mirebound/blob/main/src/main/java/com/fish/mirebound/client/MudSurfaceEffectRenderer.java): `src/main/java/com/fish/mirebound/client/MudSurfaceEffectRenderer.java`
- [Armor rendering](https://github.com/cookfishsev/mirebound/blob/main/src/main/java/com/fish/mirebound/client/ArmorMudLayer.java): `src/main/java/com/fish/mirebound/client/ArmorMudLayer.java`

### Events and tools

- [Mud eruptions](https://github.com/cookfishsev/mirebound/blob/main/src/main/java/com/fish/mirebound/eruption/MudEruptionSystem.java): `src/main/java/com/fish/mirebound/eruption/MudEruptionSystem.java`
- [Mudwork items](https://github.com/cookfishsev/mirebound/blob/main/src/main/java/com/fish/mirebound/content/mudwork/MudBallProjectile.java): `src/main/java/com/fish/mirebound/content/mudwork/MudBallProjectile.java`
- [Mud commands](https://github.com/cookfishsev/mirebound/blob/main/src/main/java/com/fish/mirebound/command/MudCommands.java): `src/main/java/com/fish/mirebound/command/MudCommands.java`

### Other components

- **Player / world**

## Connections

- Player / world → Sinking physics: enters mud
- Sinking physics → Assimilation: checks state
- Sinking physics → Player contamination: tracks contact
- Player contamination → Player / world: persists state
- Player contamination → Client network handlers: sends coverage
- Entity contamination → Client network handlers: sends entity coverage
- Client network handlers → Player mud visuals: updates state
- Client network handlers → Entity mud visuals: updates state
- Player mud visuals → Mud rendering: supplies appearance
- Player mud visuals → Armor rendering: supplies coverage
- Entity mud visuals → Mud rendering: supplies spots
- Player / world → Equipment staining: reports contacts
- Equipment staining → Player / world: updates item data
- Player / world → Skin stain rules: edits mask
- Adaptive mud conversion → Source block store: stores source
- Mud tuning → Adaptive mud conversion: converts blocks
- Player / world → Mud tuning: tunes mud
- Player / world → Terrain generation: requests terrain
- Player / world → Mud eruptions: encounters eruption
- Player / world → Mudwork items: uses item
- Player / world → Mud commands: runs command
