# mojang/bedrock-samples architecture

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

- Interactive diagram: https://gitdiagram.com/mojang/bedrock-samples
- Repository: https://github.com/mojang/bedrock-samples

## Overview

This repository is a collection of Minecraft: Bedrock Edition add-on sample files, not a running application. A creator consults the samples as examples for building add-ons; the tree separates gameplay definitions, presentation assets, and metadata such as schemas. The README establishes the samples’ purpose, but no source excerpts document runtime calls or loading relationships, so the graph avoids inferring connections among asset directories or to the game engine.

Main entry points: [`README.md`](https://github.com/mojang/bedrock-samples/blob/main/README.md) (Bedrock Samples)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_behavior["Gameplay Samples"]
  node_biomes["Biome Definitions"]
  node_blocks["Block Definitions"]
  node_entities["Entity Definitions"]
  node_items["Item Definitions"]
  node_loot["Loot Tables"]
  node_recipes["Crafting Recipes"]
  node_spawning["Spawn Rules"]
  node_trading["Trading Data"]
end

subgraph group_resources["Presentation Samples"]
  node_models["Models"]
  node_entity_visuals["Entity Visuals"]
  node_animations["Animations"]
  node_rendering["Render Controllers"]
  node_textures["Textures"]
  node_sounds["Sound Assets"]
  node_ui["UI Assets"]
end

subgraph group_metadata["Format Metadata"]
  node_schemas["JSON Schemas"]
  node_module_metadata["Module Metadata"]
end

subgraph group_guidance["Creator Guidance"]
  node_samples["Bedrock Samples<br/>[README.md]"]
end

node_creator(("Add-on Creator"))

node_creator -->|"consults examples"| node_samples

click node_samples "https://github.com/mojang/bedrock-samples/blob/main/README.md"
click node_biomes "https://github.com/mojang/bedrock-samples/tree/main/behavior_pack/biomes"
click node_blocks "https://github.com/mojang/bedrock-samples/tree/main/behavior_pack/blocks"
click node_entities "https://github.com/mojang/bedrock-samples/tree/main/behavior_pack/entities"
click node_items "https://github.com/mojang/bedrock-samples/tree/main/behavior_pack/items"
click node_loot "https://github.com/mojang/bedrock-samples/tree/main/behavior_pack/loot_tables"
click node_recipes "https://github.com/mojang/bedrock-samples/tree/main/behavior_pack/recipes"
click node_spawning "https://github.com/mojang/bedrock-samples/tree/main/behavior_pack/spawn_rules"
click node_trading "https://github.com/mojang/bedrock-samples/tree/main/behavior_pack/trading"
click node_models "https://github.com/mojang/bedrock-samples/tree/main/resource_pack/models"
click node_entity_visuals "https://github.com/mojang/bedrock-samples/tree/main/resource_pack/entity"
click node_animations "https://github.com/mojang/bedrock-samples/tree/main/resource_pack/animations"
click node_rendering "https://github.com/mojang/bedrock-samples/tree/main/resource_pack/render_controllers"
click node_textures "https://github.com/mojang/bedrock-samples/tree/main/resource_pack/textures"
click node_sounds "https://github.com/mojang/bedrock-samples/tree/main/resource_pack/sounds"
click node_ui "https://github.com/mojang/bedrock-samples/tree/main/resource_pack/ui"
click node_schemas "https://github.com/mojang/bedrock-samples/tree/main/metadata/json_schemas"
click node_module_metadata "https://github.com/mojang/bedrock-samples/tree/main/metadata"

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_biomes,node_blocks,node_entities,node_items,node_loot,node_recipes,node_spawning,node_trading toneBlue
class node_models,node_entity_visuals,node_animations,node_rendering,node_textures,node_sounds,node_ui toneAmber
class node_schemas,node_module_metadata toneMint
class node_samples toneRose
class node_creator toneIndigo
```

## Components

### Gameplay Samples

- [Biome Definitions](https://github.com/mojang/bedrock-samples/tree/main/behavior_pack/biomes): `behavior_pack/biomes`
- [Block Definitions](https://github.com/mojang/bedrock-samples/tree/main/behavior_pack/blocks): `behavior_pack/blocks`
- [Entity Definitions](https://github.com/mojang/bedrock-samples/tree/main/behavior_pack/entities): `behavior_pack/entities`
- [Item Definitions](https://github.com/mojang/bedrock-samples/tree/main/behavior_pack/items): `behavior_pack/items`
- [Loot Tables](https://github.com/mojang/bedrock-samples/tree/main/behavior_pack/loot_tables): `behavior_pack/loot_tables`
- [Crafting Recipes](https://github.com/mojang/bedrock-samples/tree/main/behavior_pack/recipes): `behavior_pack/recipes`
- [Spawn Rules](https://github.com/mojang/bedrock-samples/tree/main/behavior_pack/spawn_rules): `behavior_pack/spawn_rules`
- [Trading Data](https://github.com/mojang/bedrock-samples/tree/main/behavior_pack/trading): `behavior_pack/trading`

### Presentation Samples

- [Models](https://github.com/mojang/bedrock-samples/tree/main/resource_pack/models): `resource_pack/models`
- [Entity Visuals](https://github.com/mojang/bedrock-samples/tree/main/resource_pack/entity): `resource_pack/entity`
- [Animations](https://github.com/mojang/bedrock-samples/tree/main/resource_pack/animations): `resource_pack/animations`
- [Render Controllers](https://github.com/mojang/bedrock-samples/tree/main/resource_pack/render_controllers): `resource_pack/render_controllers`
- [Textures](https://github.com/mojang/bedrock-samples/tree/main/resource_pack/textures): `resource_pack/textures`
- [Sound Assets](https://github.com/mojang/bedrock-samples/tree/main/resource_pack/sounds): `resource_pack/sounds`
- [UI Assets](https://github.com/mojang/bedrock-samples/tree/main/resource_pack/ui): `resource_pack/ui`

### Format Metadata

- [JSON Schemas](https://github.com/mojang/bedrock-samples/tree/main/metadata/json_schemas): `metadata/json_schemas`
- [Module Metadata](https://github.com/mojang/bedrock-samples/tree/main/metadata): `metadata`

### Creator Guidance

- [Bedrock Samples](https://github.com/mojang/bedrock-samples/blob/main/README.md): `README.md`

### Other components

- **Add-on Creator**

## Connections

- Add-on Creator → Bedrock Samples: consults examples (evidence: `README.md`)
