# pumpkin-mc/pumpkin architecture

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

- Interactive diagram: https://gitdiagram.com/pumpkin-mc/pumpkin
- Repository: https://github.com/pumpkin-mc/pumpkin

## Overview

Pumpkin is a Rust Minecraft server. A player connects through the Java or Bedrock protocol, interacts with server-managed player, command, inventory, and world systems, and receives game-state updates. The server also loads configuration and plugins; world processing includes chunk lifecycle and lighting. The graph reflects documented capabilities and indexed source references; several major subsystems are represented at directory level because their implementation was not sampled.

Main entry points: [`crates/pumpkin/src/server/mod.rs`](https://github.com/pumpkin-mc/pumpkin/blob/master/crates/pumpkin/src/server/mod.rs) (Server orchestration), [`crates/pumpkin/src/entity/player.rs`](https://github.com/pumpkin-mc/pumpkin/blob/master/crates/pumpkin/src/entity/player.rs) (Player state), [`crates/pumpkin/src/net`](https://github.com/pumpkin-mc/pumpkin/tree/master/crates/pumpkin/src/net) (Network services), [`crates/pumpkin-world/src/level.rs`](https://github.com/pumpkin-mc/pumpkin/blob/master/crates/pumpkin-world/src/level.rs) (World management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Server runtime"]
  node_server["Server orchestration<br/>[mod.rs]"]
  node_entry["Server startup<br/>[main.rs]"]
  node_tick["Tick control"]
end

subgraph group_network["Network and configuration"]
  node_protocol["Java and Bedrock"]
  node_networking["Network services"]
  node_config["Server configuration"]
end

subgraph group_gameplay["Player gameplay"]
  node_commands["Command processing"]
  node_playerstate["Player state<br/>[player.rs]"]
  node_inventory["Inventory handling<br/>[screen_handler.rs]"]
  node_crafting["Crafting recipes"]
  node_equipment["Entity equipment"]
end

subgraph group_world["World simulation"]
  node_world["World management<br/>[level.rs]"]
  node_chunks["Chunk lifecycle<br/>[chunk_state.rs]"]
  node_generation["Chunk generation"]
  node_lighting["Light propagation<br/>[engine.rs]"]
  node_lightstorage["Light storage<br/>[storage.rs]"]
end

subgraph group_extension["Extensions"]
  node_plugins["Plugin system"]
  node_pluginapi["Plugin API"]
  node_gametest["Game tests"]
end

node_player(("Minecraft player"))

node_player -.->|"connects through"| node_networking
node_networking -.->|"handles packets"| node_protocol
node_entry -->|"starts"| node_server
node_server -->|"manages"| node_networking
node_server -->|"manages"| node_world
node_server -->|"manages"| node_playerstate
node_server -->|"configures"| node_commands
node_server -->|"initializes"| node_plugins
node_server -->|"ticks"| node_tick
node_server -.->|"uses settings"| node_config
node_playerstate -.->|"uses screens"| node_inventory
node_crafting -->|"builds screen"| node_inventory
node_playerstate -.->|"tracks equipment"| node_equipment
node_world -.->|"manages chunks"| node_chunks
node_chunks -->|"requests generation"| node_generation
node_lighting -->|"reads and writes"| node_lightstorage
node_plugins -.->|"exposes"| node_pluginapi
node_server -.->|"runs tests"| node_gametest

click node_server "https://github.com/pumpkin-mc/pumpkin/blob/master/crates/pumpkin/src/server/mod.rs"
click node_entry "https://github.com/pumpkin-mc/pumpkin/blob/master/crates/pumpkin/src/main.rs"
click node_tick "https://github.com/pumpkin-mc/pumpkin/blob/master/crates/pumpkin/src/server/tick_rate_manager.rs"
click node_protocol "https://github.com/pumpkin-mc/pumpkin/tree/master/crates/pumpkin-protocol/src"
click node_networking "https://github.com/pumpkin-mc/pumpkin/tree/master/crates/pumpkin/src/net"
click node_config "https://github.com/pumpkin-mc/pumpkin/tree/master/crates/pumpkin-config/src"
click node_commands "https://github.com/pumpkin-mc/pumpkin/tree/master/crates/pumpkin-command/src"
click node_playerstate "https://github.com/pumpkin-mc/pumpkin/blob/master/crates/pumpkin/src/entity/player.rs"
click node_inventory "https://github.com/pumpkin-mc/pumpkin/blob/master/crates/pumpkin-inventory/src/screen_handler.rs"
click node_crafting "https://github.com/pumpkin-mc/pumpkin/blob/master/crates/pumpkin-inventory/src/crafting/crafting_screen_handler.rs"
click node_equipment "https://github.com/pumpkin-mc/pumpkin/blob/master/crates/pumpkin-inventory/src/entity_equipment.rs"
click node_world "https://github.com/pumpkin-mc/pumpkin/blob/master/crates/pumpkin-world/src/level.rs"
click node_chunks "https://github.com/pumpkin-mc/pumpkin/blob/master/crates/pumpkin-world/src/chunk_system/chunk_state.rs"
click node_generation "https://github.com/pumpkin-mc/pumpkin/blob/master/crates/pumpkin-world/src/chunk_system/generation_cache.rs"
click node_lighting "https://github.com/pumpkin-mc/pumpkin/blob/master/crates/pumpkin-world/src/lighting/engine.rs"
click node_lightstorage "https://github.com/pumpkin-mc/pumpkin/blob/master/crates/pumpkin-world/src/lighting/storage.rs"
click node_plugins "https://github.com/pumpkin-mc/pumpkin/tree/master/crates/pumpkin/src/plugin"
click node_pluginapi "https://github.com/pumpkin-mc/pumpkin/tree/master/crates/pumpkin-plugin-api/src"
click node_gametest "https://github.com/pumpkin-mc/pumpkin/blob/master/crates/pumpkin/src/server/server_test_manager.rs"

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_server,node_entry,node_tick toneBlue
class node_protocol,node_networking,node_config toneAmber
class node_commands,node_playerstate,node_inventory,node_crafting,node_equipment toneMint
class node_world,node_chunks,node_generation,node_lighting,node_lightstorage toneRose
class node_plugins,node_pluginapi,node_gametest,node_player toneIndigo
```

## Components

### Server runtime

- [Server orchestration](https://github.com/pumpkin-mc/pumpkin/blob/master/crates/pumpkin/src/server/mod.rs): `crates/pumpkin/src/server/mod.rs`
- [Server startup](https://github.com/pumpkin-mc/pumpkin/blob/master/crates/pumpkin/src/main.rs): `crates/pumpkin/src/main.rs`
- [Tick control](https://github.com/pumpkin-mc/pumpkin/blob/master/crates/pumpkin/src/server/tick_rate_manager.rs): `crates/pumpkin/src/server/tick_rate_manager.rs`

### Network and configuration

- [Java and Bedrock](https://github.com/pumpkin-mc/pumpkin/tree/master/crates/pumpkin-protocol/src): `crates/pumpkin-protocol/src`
- [Network services](https://github.com/pumpkin-mc/pumpkin/tree/master/crates/pumpkin/src/net): `crates/pumpkin/src/net`
- [Server configuration](https://github.com/pumpkin-mc/pumpkin/tree/master/crates/pumpkin-config/src): `crates/pumpkin-config/src`

### Player gameplay

- [Command processing](https://github.com/pumpkin-mc/pumpkin/tree/master/crates/pumpkin-command/src): `crates/pumpkin-command/src`
- [Player state](https://github.com/pumpkin-mc/pumpkin/blob/master/crates/pumpkin/src/entity/player.rs): `crates/pumpkin/src/entity/player.rs`
- [Inventory handling](https://github.com/pumpkin-mc/pumpkin/blob/master/crates/pumpkin-inventory/src/screen_handler.rs): `crates/pumpkin-inventory/src/screen_handler.rs`
- [Crafting recipes](https://github.com/pumpkin-mc/pumpkin/blob/master/crates/pumpkin-inventory/src/crafting/crafting_screen_handler.rs): `crates/pumpkin-inventory/src/crafting/crafting_screen_handler.rs`
- [Entity equipment](https://github.com/pumpkin-mc/pumpkin/blob/master/crates/pumpkin-inventory/src/entity_equipment.rs): `crates/pumpkin-inventory/src/entity_equipment.rs`

### World simulation

- [World management](https://github.com/pumpkin-mc/pumpkin/blob/master/crates/pumpkin-world/src/level.rs): `crates/pumpkin-world/src/level.rs`
- [Chunk lifecycle](https://github.com/pumpkin-mc/pumpkin/blob/master/crates/pumpkin-world/src/chunk_system/chunk_state.rs): `crates/pumpkin-world/src/chunk_system/chunk_state.rs`
- [Chunk generation](https://github.com/pumpkin-mc/pumpkin/blob/master/crates/pumpkin-world/src/chunk_system/generation_cache.rs): `crates/pumpkin-world/src/chunk_system/generation_cache.rs`
- [Light propagation](https://github.com/pumpkin-mc/pumpkin/blob/master/crates/pumpkin-world/src/lighting/engine.rs): `crates/pumpkin-world/src/lighting/engine.rs`
- [Light storage](https://github.com/pumpkin-mc/pumpkin/blob/master/crates/pumpkin-world/src/lighting/storage.rs): `crates/pumpkin-world/src/lighting/storage.rs`

### Extensions

- [Plugin system](https://github.com/pumpkin-mc/pumpkin/tree/master/crates/pumpkin/src/plugin): `crates/pumpkin/src/plugin`
- [Plugin API](https://github.com/pumpkin-mc/pumpkin/tree/master/crates/pumpkin-plugin-api/src): `crates/pumpkin-plugin-api/src`
- [Game tests](https://github.com/pumpkin-mc/pumpkin/blob/master/crates/pumpkin/src/server/server_test_manager.rs): `crates/pumpkin/src/server/server_test_manager.rs`

### Other components

- **Minecraft player**

## Connections

- Minecraft player → Network services: connects through
- Network services → Java and Bedrock: handles packets
- Server startup → Server orchestration: starts (evidence: `crates/pumpkin/src/main.rs`)
- Server orchestration → Network services: manages (evidence: `crates/pumpkin/src/server/mod.rs`)
- Server orchestration → World management: manages (evidence: `crates/pumpkin/src/server/mod.rs`)
- Server orchestration → Player state: manages (evidence: `crates/pumpkin/src/server/mod.rs`)
- Server orchestration → Command processing: configures (evidence: `crates/pumpkin/src/server/mod.rs`)
- Server orchestration → Plugin system: initializes (evidence: `crates/pumpkin/src/server/mod.rs`)
- Server orchestration → Tick control: ticks (evidence: `crates/pumpkin/src/server/mod.rs`)
- Server orchestration → Server configuration: uses settings
- Player state → Inventory handling: uses screens
- Crafting recipes → Inventory handling: builds screen (evidence: `crates/pumpkin-inventory/src/crafting/crafting_screen_handler.rs`)
- Player state → Entity equipment: tracks equipment
- World management → Chunk lifecycle: manages chunks (evidence: `crates/pumpkin-world/src/chunk_system/chunk_state.rs`)
- Chunk lifecycle → Chunk generation: requests generation (evidence: `crates/pumpkin-world/src/chunk_system/generation_cache.rs`)
- Light propagation → Light storage: reads and writes (evidence: `crates/pumpkin-world/src/lighting/engine.rs`)
- Plugin system → Plugin API: exposes
- Server orchestration → Game tests: runs tests (evidence: `crates/pumpkin/src/server/mod.rs`)
