# pirut/earth-platform architecture

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

- Interactive diagram: https://gitdiagram.com/pirut/earth-platform
- Repository: https://github.com/pirut/earth-platform

## Overview

Earth Platform is a Minecraft mod that generates a true-scale Earth world from real geographic data, then streams and renders its terrain while providing travel and survival features. The documented player flow is to choose an Earth starting location, enter the world, and explore; first visits download terrain and later visits can use the local cache. The graph preserves the major documented terrain, biome, distant-rendering, travel, and survival capabilities. Some implementation links are dashed because the relevant source was not sampled.

Main entry points: [`geography/src/main/java/io/earthplatform/geography/globe`](https://github.com/pirut/earth-platform/tree/main/geography/src/main/java/io/earthplatform/geography/globe) (Terrain data), [`minecraft/src/main/java/io/earthplatform/minecraft/cubic/client/ClientCubeWorld.java`](https://github.com/pirut/earth-platform/blob/main/minecraft/src/main/java/io/earthplatform/minecraft/cubic/client/ClientCubeWorld.java) (Client cube world), [`minecraft/src/main/java/io/earthplatform/minecraft/cubic/play/client/EarthPlayClient.java`](https://github.com/pirut/earth-platform/blob/main/minecraft/src/main/java/io/earthplatform/minecraft/cubic/play/client/EarthPlayClient.java) (Earth play), [`minecraft/src/main/java/io/earthplatform/minecraft/cubic/earth/EarthGenerator.java`](https://github.com/pirut/earth-platform/blob/main/minecraft/src/main/java/io/earthplatform/minecraft/cubic/earth/EarthGenerator.java) (Earth generator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_world["World and generation"]
  node_worldtypes["Earth world type"]
  node_generator["Earth generator"]
  node_cube_world["Cube world<br/>[CubeWorld.java]"]
  node_server_world["Server cube world"]
  node_cube_store[("Cube storage<br/>[CubeStorage.java]")]
end

subgraph group_geodata["Geographic data"]
  node_geo_data["Terrain data"]
  node_bare_earth["Ground synthesis<br/>[BareEarth.java]"]
  node_local_cache[("Terrain cache<br/>[DiskCache.java]")]
end

subgraph group_client["Client experience"]
  node_setup["World setup"]
  node_play["Earth play"]
  node_client_world["Client cube world"]
  node_cubic_client["Client streaming<br/>[CubicClient.java]"]
  node_near_render["Near terrain<br/>[CubeRenderer.java]"]
  node_far_render["Far terrain<br/>[Far.java]"]
  node_travel["Travel features<br/>[EarthFlight.java]"]
  node_jetstream["Jet streams<br/>[JetStream.java]"]
end

subgraph group_platform["Loader integration"]
  node_loader_client["Loader client hooks"]
  node_neo_events["NeoForge client hooks"]
end

node_player(("Player"))
node_minecraft(("Minecraft"))
node_terrain_sources["Open terrain sources"]

node_player -->|"chooses start"| node_setup
node_setup -->|"opens picker"| node_play
node_play -.->|"selects preset"| node_worldtypes
node_worldtypes -.->|"creates world"| node_generator
node_generator -.->|"samples Earth"| node_geo_data
node_geo_data -->|"uses open data"| node_terrain_sources
node_geo_data -.->|"builds ground"| node_bare_earth
node_geo_data -.->|"caches terrain"| node_local_cache
node_generator -.->|"generates cubes"| node_cube_world
node_server_world -.->|"persists cubes"| node_cube_store
node_cube_world -.->|"streams cubes"| node_client_world
node_loader_client -->|"ticks client"| node_cubic_client
node_loader_client -->|"renders HUD"| node_play
node_neo_events -->|"renders HUD"| node_play
node_cubic_client -.->|"manages streaming"| node_client_world
node_client_world -.->|"renders nearby"| node_near_render
node_client_world -.->|"renders distant"| node_far_render
node_player -->|"travels globe"| node_travel
node_player -->|"rides currents"| node_jetstream
node_cube_world -->|"supports survival"| node_minecraft
node_far_render -->|"shows horizons"| node_player

click node_setup "https://github.com/pirut/earth-platform/tree/main/minecraft/src/main/java/io/earthplatform/minecraft/cubic/play/client"
click node_play "https://github.com/pirut/earth-platform/blob/main/minecraft/src/main/java/io/earthplatform/minecraft/cubic/play/client/EarthPlayClient.java"
click node_worldtypes "https://github.com/pirut/earth-platform/tree/main/minecraft/src/main/java/io/earthplatform/minecraft/cubic/play"
click node_generator "https://github.com/pirut/earth-platform/blob/main/minecraft/src/main/java/io/earthplatform/minecraft/cubic/earth/EarthGenerator.java"
click node_cube_world "https://github.com/pirut/earth-platform/blob/main/minecraft/src/main/java/io/earthplatform/minecraft/cubic/CubeWorld.java"
click node_server_world "https://github.com/pirut/earth-platform/blob/main/minecraft/src/main/java/io/earthplatform/minecraft/cubic/ServerCubeWorld.java"
click node_cube_store "https://github.com/pirut/earth-platform/blob/main/minecraft/src/main/java/io/earthplatform/minecraft/cubic/CubeStorage.java"
click node_geo_data "https://github.com/pirut/earth-platform/tree/main/geography/src/main/java/io/earthplatform/geography/globe"
click node_bare_earth "https://github.com/pirut/earth-platform/blob/main/geography/src/main/java/io/earthplatform/geography/globe/BareEarth.java"
click node_local_cache "https://github.com/pirut/earth-platform/blob/main/geography/src/main/java/io/earthplatform/geography/globe/DiskCache.java"
click node_client_world "https://github.com/pirut/earth-platform/blob/main/minecraft/src/main/java/io/earthplatform/minecraft/cubic/client/ClientCubeWorld.java"
click node_cubic_client "https://github.com/pirut/earth-platform/blob/main/minecraft/src/main/java/io/earthplatform/minecraft/cubic/client/CubicClient.java"
click node_near_render "https://github.com/pirut/earth-platform/blob/main/minecraft/src/main/java/io/earthplatform/minecraft/cubic/client/CubeRenderer.java"
click node_far_render "https://github.com/pirut/earth-platform/blob/main/minecraft/src/main/java/io/earthplatform/minecraft/cubic/far/Far.java"
click node_travel "https://github.com/pirut/earth-platform/blob/main/minecraft/src/main/java/io/earthplatform/minecraft/cubic/play/client/EarthFlight.java"
click node_jetstream "https://github.com/pirut/earth-platform/blob/main/minecraft/src/main/java/io/earthplatform/minecraft/cubic/jet/JetStream.java"
click node_loader_client "https://github.com/pirut/earth-platform/blob/main/fabric/src/main/java/io/earthplatform/minecraft/fabric/EarthPlatformFabricClient.java"
click node_neo_events "https://github.com/pirut/earth-platform/blob/main/minecraft/src/neoforge/java/io/earthplatform/minecraft/neoforge/NeoForgeClientEvents.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_worldtypes,node_generator,node_cube_world,node_server_world,node_cube_store toneBlue
class node_geo_data,node_bare_earth,node_local_cache toneAmber
class node_setup,node_play,node_client_world,node_cubic_client,node_near_render,node_far_render,node_travel,node_jetstream toneMint
class node_loader_client,node_neo_events toneRose
class node_player,node_minecraft,node_terrain_sources toneIndigo
```

## Components

### World and generation

- [Earth world type](https://github.com/pirut/earth-platform/tree/main/minecraft/src/main/java/io/earthplatform/minecraft/cubic/play): `minecraft/src/main/java/io/earthplatform/minecraft/cubic/play`
- [Earth generator](https://github.com/pirut/earth-platform/blob/main/minecraft/src/main/java/io/earthplatform/minecraft/cubic/earth/EarthGenerator.java): `minecraft/src/main/java/io/earthplatform/minecraft/cubic/earth/EarthGenerator.java`
- [Cube world](https://github.com/pirut/earth-platform/blob/main/minecraft/src/main/java/io/earthplatform/minecraft/cubic/CubeWorld.java): `minecraft/src/main/java/io/earthplatform/minecraft/cubic/CubeWorld.java`
- [Server cube world](https://github.com/pirut/earth-platform/blob/main/minecraft/src/main/java/io/earthplatform/minecraft/cubic/ServerCubeWorld.java): `minecraft/src/main/java/io/earthplatform/minecraft/cubic/ServerCubeWorld.java`
- [Cube storage](https://github.com/pirut/earth-platform/blob/main/minecraft/src/main/java/io/earthplatform/minecraft/cubic/CubeStorage.java): `minecraft/src/main/java/io/earthplatform/minecraft/cubic/CubeStorage.java`

### Geographic data

- [Terrain data](https://github.com/pirut/earth-platform/tree/main/geography/src/main/java/io/earthplatform/geography/globe): `geography/src/main/java/io/earthplatform/geography/globe`
- [Ground synthesis](https://github.com/pirut/earth-platform/blob/main/geography/src/main/java/io/earthplatform/geography/globe/BareEarth.java): `geography/src/main/java/io/earthplatform/geography/globe/BareEarth.java`
- [Terrain cache](https://github.com/pirut/earth-platform/blob/main/geography/src/main/java/io/earthplatform/geography/globe/DiskCache.java): `geography/src/main/java/io/earthplatform/geography/globe/DiskCache.java`

### Client experience

- [World setup](https://github.com/pirut/earth-platform/tree/main/minecraft/src/main/java/io/earthplatform/minecraft/cubic/play/client): `minecraft/src/main/java/io/earthplatform/minecraft/cubic/play/client`
- [Earth play](https://github.com/pirut/earth-platform/blob/main/minecraft/src/main/java/io/earthplatform/minecraft/cubic/play/client/EarthPlayClient.java): `minecraft/src/main/java/io/earthplatform/minecraft/cubic/play/client/EarthPlayClient.java`
- [Client cube world](https://github.com/pirut/earth-platform/blob/main/minecraft/src/main/java/io/earthplatform/minecraft/cubic/client/ClientCubeWorld.java): `minecraft/src/main/java/io/earthplatform/minecraft/cubic/client/ClientCubeWorld.java`
- [Client streaming](https://github.com/pirut/earth-platform/blob/main/minecraft/src/main/java/io/earthplatform/minecraft/cubic/client/CubicClient.java): `minecraft/src/main/java/io/earthplatform/minecraft/cubic/client/CubicClient.java`
- [Near terrain](https://github.com/pirut/earth-platform/blob/main/minecraft/src/main/java/io/earthplatform/minecraft/cubic/client/CubeRenderer.java): `minecraft/src/main/java/io/earthplatform/minecraft/cubic/client/CubeRenderer.java`
- [Far terrain](https://github.com/pirut/earth-platform/blob/main/minecraft/src/main/java/io/earthplatform/minecraft/cubic/far/Far.java): `minecraft/src/main/java/io/earthplatform/minecraft/cubic/far/Far.java`
- [Travel features](https://github.com/pirut/earth-platform/blob/main/minecraft/src/main/java/io/earthplatform/minecraft/cubic/play/client/EarthFlight.java): `minecraft/src/main/java/io/earthplatform/minecraft/cubic/play/client/EarthFlight.java`
- [Jet streams](https://github.com/pirut/earth-platform/blob/main/minecraft/src/main/java/io/earthplatform/minecraft/cubic/jet/JetStream.java): `minecraft/src/main/java/io/earthplatform/minecraft/cubic/jet/JetStream.java`

### Loader integration

- [Loader client hooks](https://github.com/pirut/earth-platform/blob/main/fabric/src/main/java/io/earthplatform/minecraft/fabric/EarthPlatformFabricClient.java): `fabric/src/main/java/io/earthplatform/minecraft/fabric/EarthPlatformFabricClient.java`
- [NeoForge client hooks](https://github.com/pirut/earth-platform/blob/main/minecraft/src/neoforge/java/io/earthplatform/minecraft/neoforge/NeoForgeClientEvents.java): `minecraft/src/neoforge/java/io/earthplatform/minecraft/neoforge/NeoForgeClientEvents.java`

### Other components

- **Player**
- **Minecraft**
- **Open terrain sources**

## Connections

- Player → World setup: chooses start (evidence: `README.md`)
- World setup → Earth play: opens picker (evidence: `minecraft/src/main/java/io/earthplatform/minecraft/cubic/play/client/EarthPlayClient.java`)
- Earth play → Earth world type: selects preset (evidence: `minecraft/src/main/java/io/earthplatform/minecraft/cubic/play/client/EarthPlayClient.java`)
- Earth world type → Earth generator: creates world
- Earth generator → Terrain data: samples Earth
- Terrain data → Open terrain sources: uses open data (evidence: `README.md`)
- Terrain data → Ground synthesis: builds ground (evidence: `geography/src/main/java/io/earthplatform/geography/globe/BareEarth.java`)
- Terrain data → Terrain cache: caches terrain (evidence: `geography/src/main/java/io/earthplatform/geography/globe/BareEarth.java`)
- Earth generator → Cube world: generates cubes
- Server cube world → Cube storage: persists cubes
- Cube world → Client cube world: streams cubes
- Loader client hooks → Client streaming: ticks client (evidence: `fabric/src/main/java/io/earthplatform/minecraft/fabric/EarthPlatformFabricClient.java`)
- Loader client hooks → Earth play: renders HUD (evidence: `fabric/src/main/java/io/earthplatform/minecraft/fabric/EarthPlatformFabricClient.java`)
- NeoForge client hooks → Earth play: renders HUD (evidence: `minecraft/src/neoforge/java/io/earthplatform/minecraft/neoforge/NeoForgeClientEvents.java`)
- Client streaming → Client cube world: manages streaming (evidence: `minecraft/src/main/java/io/earthplatform/minecraft/cubic/client/CubicClient.java`)
- Client cube world → Near terrain: renders nearby
- Client cube world → Far terrain: renders distant
- Player → Travel features: travels globe (evidence: `README.md`)
- Player → Jet streams: rides currents (evidence: `README.md`)
- Cube world → Minecraft: supports survival (evidence: `README.md`)
- Far terrain → Player: shows horizons (evidence: `README.md`)
