Skip to content

Commit 6dbd31b

Browse files
committed
updated and fixed outdated docs for composite entries
1 parent 3497a10 commit 6dbd31b

1 file changed

Lines changed: 35 additions & 18 deletions

File tree

docs/field-guide/datapacks.mdx

Lines changed: 35 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,17 @@ Field Guide uses specific entity tags to handle default scanning and categorizat
119119

120120
Sometimes you may want scanning one entity to unlock the entry for a different one. This is useful for entities that have multiple variations or distinct parts (like multi-part bosses) where scanning any part should unlock the main entry.
121121

122+
The redirected block/entity will automatically be removed from categories and will no longer appear as its own entry.
123+
122124
You can define these redirects by creating a JSON file at:
123125
`data/<namespace>/fieldguide/redirects/<filename>.json`
124126

125127
```json
126128
{
127129
"entries": [
128130
{
129-
"source": "minecraft:bamboo_sapling",
130-
"target": "minecraft:bamboo"
131+
"source": "farmersdelight:budding_tomatoes",
132+
"target": "farmersdelight:tomatoes"
131133
},
132134
{
133135
"source": "enemyexpansion:vampire_biter",
@@ -142,31 +144,46 @@ You can define these redirects by creating a JSON file at:
142144

143145
A **Composite Entry** is a powerful feature that allows you to group multiple entities or blocks into a single book page, or render custom scenes using NBT structures.
144146

147+
The composite will replace any of the component blocks if they are included in a category. The individual components will automatically be removed from all categories.
148+
145149
This is highly recommended for multi-block entries, structures, or grouped concepts (like grouping all tree blocks for a specific tree).
146150

151+
You can define composites by creating a JSON file at:
152+
`data/<namespace>/fieldguide/composites/<filename>.json`
153+
147154
```json
148155
{
149-
"type": "composite",
150-
"id": "mypack:custom_boss_encounter",
151-
"display_id": "minecraft:zombie",
152-
"components": [
153-
"minecraft:zombie",
154-
"minecraft:skeleton"
155-
],
156-
"structure_nbt": "mypack:structures/spawner_room",
157-
"stacked_blocks": [
158-
"0,0,0|minecraft:cobblestone",
159-
"0,1,0|minecraft:mossy_cobblestone"
160-
]
156+
"values": [
157+
{
158+
"id": "farmersdelight:rice",
159+
"render": [
160+
"farmersdelight:rice|age=3,supporting=true",
161+
"farmersdelight:rice_panicles|age=3"
162+
],
163+
"components": [
164+
"farmersdelight:rice",
165+
"farmersdelight:rice_panicles"
166+
],
167+
},
168+
{
169+
"id": "minecraft:mangrove_propagule",
170+
"structure_nbt": "fieldguide:mangrove",
171+
"components": [
172+
"minecraft:mangrove_log",
173+
"minecraft:mangrove_leaves",
174+
"minecraft:mangrove_roots",
175+
"minecraft:muddy_mangrove_roots"
176+
]
177+
},
178+
]
161179
}
162-
163180
```
164181

165182
* `id`: The unique identifier for this custom entry.
166183
* `display_id` *(Optional)*: The primary entity or block ID to represent this entry in the UI.
167-
* `components` *(Optional)*: An array of entity/block IDs that make up this composite entry.
168-
* `structure_nbt` *(Optional)*: The resource location of an NBT structure file to render in the book. *(Tip: You can use the `/fieldguide export feature <feature_id>` command in-game to easily generate an NBT file of a worldgen feature!)*
169-
* `stacked_blocks` *(Optional)*: An array of block IDs to render. By default, items will stack on top of each other vertically. You can also specify exact 3D coordinates using the format `"X,Y,Z|block_id"`.
184+
* `components` *(Optional)*: An array of entity/block IDs that make up this composite entry. These will no longer appear individually as entries.
185+
* `structure_nbt`: Provide the resource location of an NBT structure file to render. *(Tip: You can use the `/fieldguide export feature <feature_id>` command in-game to easily generate an NBT file of a worldgen feature!)*
186+
* `render`: An alternative to `structure_nbt` for simpler structures. Provide an array of block IDs to render. By default, blocks will stack on top of each other vertically. You can also specify exact 3D coordinates for each block using the format `"X,Y,Z|block_id"`.
170187

171188
---
172189

0 commit comments

Comments
 (0)