Prefab Structures
Prefabs are pre-built block structures used for world generation and spawning. They range from simple trees to complex dungeon rooms, monuments, and NPC camps.
Asset Location
Section titled “Asset Location”DirectoryAssets/Server/Prefabs/
DirectoryCave/
DirectoryFormations/
- …
DirectoryGeysers/
- …
DirectoryKlops/
- …
DirectoryDungeon/
DirectoryChallenge_Gate/
- …
DirectoryCursed_Crypt/
- …
DirectoryGoblin_Lair/
- …
DirectoryLabyrinth/
- …
DirectoryMagic_Ruins/
- …
DirectoryOutlander_Temple/
- …
DirectoryRift/
- …
DirectorySandstone/
- …
DirectorySewer/
- …
DirectoryShale/
- …
DirectorySlate/
- …
DirectoryStone/
- …
DirectoryMineshaft/
- …
DirectoryMineshaft_Drift/
- …
DirectoryMonuments/
DirectoryChallenge/
- …
DirectoryEncounter/
- …
DirectoryIncidental/
- …
DirectoryStory/
- …
DirectoryUnique/
- …
DirectoryNpc/
- …
DirectoryPlants/
- …
DirectoryRock_Formations/
- …
DirectorySpawn/
- …
DirectoryTesting/
- …
DirectoryTrees/
DirectoryOak/
- …
DirectoryBirch/
- …
DirectoryAsh/
- …
DirectoryPine/
- …
- (70+ tree types)
- Example_Portal1.prefab.json
- default.minigame.prefab.json
Prefab Schema
Section titled “Prefab Schema”Core Properties
Section titled “Core Properties”| Field | Type | Description |
|---|---|---|
version | int | Prefab format version |
blockIdVersion | int | Block ID mapping version |
anchorX | int | X anchor point |
anchorY | int | Y anchor point |
anchorZ | int | Z anchor point |
blocks | array | Block placement data |
Block Entry Properties
Section titled “Block Entry Properties”| Field | Type | Description |
|---|---|---|
x | int | X offset from anchor |
y | int | Y offset from anchor |
z | int | Z offset from anchor |
name | string | Block type ID |
rotation | int | Optional rotation (0-3) |
File Format
Section titled “File Format”Prefabs use .prefab.json extension with optional .prefab.json.lpf compressed variant:
{ "version": 8, "blockIdVersion": 1, "anchorX": 0, "anchorY": 0, "anchorZ": 0, "blocks": [ { "x": -1, "y": 0, "z": -2, "name": "Rock_Aqua_Brick" }, { "x": -1, "y": 1, "z": -2, "name": "Rock_Aqua_Brick" }, { "x": 1, "y": 0, "z": -1, "name": "Rock_Aqua_Brick_Stairs", "rotation": 1 } ]}Prefab Categories
Section titled “Prefab Categories”Located in Trees/, organized by species and growth stage:
DirectoryTrees/
DirectoryOak/
DirectoryStage_0/
- Oak_Stage0_001.prefab.json
- Oak_Stage0_002.prefab.json
DirectoryStage_1/
- …
DirectoryStage_2/
- …
DirectoryStage_3/
- …
DirectoryStage_4/
- …
DirectoryStage_5/
- …
DirectoryStage_6/
- …
DirectoryStage_7/
- …
DirectoryStumps/
- …
DirectoryBirch/
- …
DirectoryPine/
- …
- …
Stage System:
| Stage | Description |
|---|---|
Stage_0 / Stage_00 | Sapling/small |
Stage_1 - Stage_3 | Growing sizes |
Stage_4 - Stage_5 | Medium trees |
Stage_6 - Stage_7 | Large/giant trees |
Stumps | Cut tree remains |
Tree Types (70+ species):
- Temperate: Oak, Birch, Beech, Ash, Aspen
- Autumn: Autumn, Amber
- Magical: Azure, Hedera
- Tropical: Banyan, Bamboo, Palm
- Cold: Pine, Spruce, Fir, Boreal
- Dead: Ash_Dead, Beech_Dry
Cave Formations
Section titled “Cave Formations”Located in Cave/:
| Directory | Contents |
|---|---|
Formations/Rock_Stone/ | Stone stalactites/stalagmites |
Formations/Rock_Sandstone/ | Sandstone formations |
Formations/Rock_Volcanic/ | Volcanic rock formations |
Geysers/ | Geyser prefabs |
Klops/ | Klops (troll) cave dwellings |
Klops Cave Structure:
DirectoryKlops/Basalt/
DirectoryStart/ Entry room
- …
DirectoryMain/ Main living area
- …
DirectoryMain_2/ Secondary room
- …
DirectoryMain_3/ Tertiary room
- …
DirectoryBedroom/ Sleeping area
- …
DirectoryBathroom/ Utility room
- …
DirectoryCellar/ Storage
- …
DirectoryCave/ Natural cave section
- …
DirectoryStairs_Up/ Upper connection
- …
DirectoryStairs_Down/ Lower connection
- …
DirectoryEntrance/ Cave entrance
- …
Dungeons
Section titled “Dungeons”Located in Dungeon/, organized by dungeon type:
| Dungeon | Description |
|---|---|
Challenge_Gate/ | Challenge room structures |
Cursed_Crypt/ | Undead dungeon areas |
Goblin_Lair/ | Goblin cave rooms |
Labyrinth/ | Maze-like structures |
Magic_Ruins/ | Ancient magical ruins |
Outlander_Temple/ | Outlander faction temple |
Rift/ | Dimensional rift areas |
Sewer/ | Underground sewer system |
Stone/ | Generic stone dungeon |
Shale/ | Shale rock dungeon |
Slate/ | Slate rock dungeon |
Sandstone/ | Desert dungeon |
Monuments
Section titled “Monuments”Located in Monuments/:
| Category | Description |
|---|---|
Challenge/ | Combat challenge arenas |
Encounter/ | NPC encounter locations |
Incidental/ | Small points of interest |
Story/ | Story-related structures |
Unique/ | One-of-a-kind locations |
NPC Camps
Section titled “NPC Camps”Located in Npc/:
- Camp structures
- Faction buildings
- NPC spawn points
Plants
Section titled “Plants”Located in Plants/:
- Bushes and shrubs
- Flowers and grass
- Crops and farming plants
Rock Formations
Section titled “Rock Formations”Located in Rock_Formations/:
- Natural rock outcrops
- Boulder clusters
- Cliff faces
Mineshafts
Section titled “Mineshafts”| Directory | Description |
|---|---|
Mineshaft/ | Standard mine tunnels |
Mineshaft_Drift/ | Drift mine structures |
Examples
Section titled “Examples”Simple Tree Prefab
Section titled “Simple Tree Prefab”{ "version": 8, "blockIdVersion": 3, "anchorX": 0, "anchorY": 0, "anchorZ": 0, "blocks": [ { "x": 0, "y": 0, "z": 0, "name": "Plant_Trunk_Oak" }, { "x": 0, "y": 1, "z": 0, "name": "Plant_Trunk_Oak" }, { "x": 0, "y": 2, "z": 0, "name": "Plant_Trunk_Oak" }, { "x": 0, "y": 3, "z": 0, "name": "Plant_Leaves_Oak" }, { "x": -1, "y": 3, "z": 0, "name": "Plant_Leaves_Oak" }, { "x": 1, "y": 3, "z": 0, "name": "Plant_Leaves_Oak" }, { "x": 0, "y": 3, "z": -1, "name": "Plant_Leaves_Oak" }, { "x": 0, "y": 3, "z": 1, "name": "Plant_Leaves_Oak" }, { "x": 0, "y": 4, "z": 0, "name": "Plant_Leaves_Oak" } ]}Structure with Rotation
Section titled “Structure with Rotation”{ "version": 8, "blockIdVersion": 0, "anchorX": 0, "anchorY": 0, "anchorZ": 0, "blocks": [ { "x": -1, "y": 0, "z": 0, "name": "Furniture_Village_Window", "rotation": 1 }, { "x": -1, "y": 1, "z": 0, "name": "Furniture_Village_Window", "rotation": 1 }, { "x": 0, "y": 0, "z": -1, "name": "Furniture_Village_Window" }, { "x": 0, "y": -1, "z": 0, "name": "Rock_Gold_Brick" }, { "x": 0, "y": 2, "z": 0, "name": "Deco_Lantern" } ]}Empty Placeholder
Section titled “Empty Placeholder”{ "version": 8, "blockIdVersion": 8, "anchorX": 0, "anchorY": 0, "anchorZ": 0, "blocks": [ { "x": 0, "y": 0, "z": 0, "name": "Empty" }, { "x": 0, "y": 1, "z": 0, "name": "Empty" } ]}The Empty block type clears existing blocks at that position.
Rotation Values
Section titled “Rotation Values”| Value | Direction |
|---|---|
0 | North (default) |
1 | East (90°) |
2 | South (180°) |
3 | West (270°) |
Anchor Points
Section titled “Anchor Points”The anchor point (anchorX, anchorY, anchorZ) defines where the prefab is placed relative to its spawn position:
- X/Z = 0: Prefab centered on placement point
- Y = 0: Bottom of prefab at placement height
Block coordinates are relative to this anchor.
Compressed Format (.lpf)
Section titled “Compressed Format (.lpf)”Large prefabs have accompanying .prefab.json.lpf files containing compressed binary data for faster loading.
Creating Custom Prefabs
Section titled “Creating Custom Prefabs”{ "version": 8, "blockIdVersion": 1, "anchorX": 0, "anchorY": 0, "anchorZ": 0, "blocks": [ { "x": 0, "y": 0, "z": 0, "name": "Rock_Stone_Brick" }, { "x": 1, "y": 0, "z": 0, "name": "Rock_Stone_Brick" }, { "x": 0, "y": 0, "z": 1, "name": "Rock_Stone_Brick" }, { "x": 1, "y": 0, "z": 1, "name": "Rock_Stone_Brick" }, { "x": 0, "y": 1, "z": 0, "name": "Rock_Stone_Brick" }, { "x": 1, "y": 1, "z": 0, "name": "Rock_Stone_Brick" }, { "x": 0, "y": 1, "z": 1, "name": "Rock_Stone_Brick" }, { "x": 1, "y": 1, "z": 1, "name": "Rock_Stone_Brick" }, { "x": 0, "y": 2, "z": 0, "name": "Rock_Stone_Brick_Stairs" }, { "x": 1, "y": 2, "z": 0, "name": "Rock_Stone_Brick_Stairs", "rotation": 2 }, { "x": 0, "y": 2, "z": 1, "name": "Rock_Stone_Brick_Stairs", "rotation": 1 }, { "x": 1, "y": 2, "z": 1, "name": "Rock_Stone_Brick_Stairs", "rotation": 3 } ]}Block Naming Conventions
Section titled “Block Naming Conventions”Prefabs use standard block type IDs:
| Category | Pattern | Examples |
|---|---|---|
| Rock | Rock_[Material]_[Variant] | Rock_Stone_Brick, Rock_Aqua_Brick_Ornate |
| Wood | Wood_[Type]_[Variant] | Wood_Oak_Planks |
| Plants | Plant_[Type]_[Species] | Plant_Leaves_Oak, Plant_Trunk_Birch |
| Furniture | Furniture_[Set]_[Item] | Furniture_Village_Window |
| Decoration | Deco_[Type] | Deco_Lantern |
| Empty | Empty | Clears block |
Best Practices
Section titled “Best Practices”- Use meaningful anchor points - Center on logical placement position
- Include rotation for directional blocks - Doors, stairs, etc.
- Keep coordinates reasonable - Large prefabs impact performance
- Use Empty strategically - Clear unwanted terrain
- Version your prefabs - Use current version number (8)
- Match blockIdVersion - Ensure block IDs are valid for version
World Generation Integration
Section titled “World Generation Integration”Prefabs are placed during world generation based on:
- Biome rules
- Terrain conditions
- Random distribution
- Dungeon node graphs
Related
Section titled “Related”- Block Types - Block definitions
- World Instances - Instance configuration
- Environments - Environment settings
- World Generation - World generation system