CompanionBlockSpawners
Asset path: Server/NPC/Spawn/CompanionBlockSpawners/*.json
A configuration that spawns a companion NPC when a spawner block and all of its required surrounding blocks are present within a radius. Requirement blocks are claimed exclusively (two spawners can't share one). While the setup holds, the referenced spawn marker keeps the companion alive (re-spawning it on death); breaking the setup despawns it.
Parent
When set this asset will inherit properties from the named asset.
When inheriting from another CompanionBlockSpawnerRecipe most properties will simply be copied from the parent asset to this asset. In the case where both child and parent provide a field the child field will simply replace the value provided by the parent, in the case of nested structures this will apply to the fields within the structure. In some cases the field may decide to act differently, for example: by merging the parent and child fields together.
Type information: String
Tags
Tags are a general way to describe an asset that can be interpreted by other systems in a way they see fit.
For example you could tag something with a Material tag with the values Solid and Stone, And another single tag Ore.
Tags will be expanded into a single list of tags automatically. Using the above example with Material and Ore the end result would be the following list of tags: Ore, Material, Solid, Stone, Material=Solid and Material=Stone.
Type information:
(Nullable) Map of the following:
| Key | Type |
|---|---|
any String | Array of String |
SpawnerBlockTypeKey
The block type key of the spawner block that hosts the companion.
Type information: (Nullable) String that matches the pattern: [^\s] and is at least 1 characters long
Reference to a BlockType asset
Radius
The radius (in blocks) around the spawner within which the required blocks are searched for.
Type information: Number defaults to: 1.0
RequiredBlocks
The requirement blocks and their counts that must be present within the radius for the companion to spawn.
Type information:
Array of the type: A required block - how it is matched (MatchBy) and the value to match (Value) - plus the minimum count of it within the recipe radius.
RequiredBlock with the following properties:
| Key | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| MatchBy | Any one of the following String:
MatchBy
| How Value is interpreted: BlockId for an exact block type key, or Tag for a block tag. | ||||||
| Value | (Nullable) String | The exact block type key (MatchBy=BlockId) or block tag such as "Bed" / "Family=Crude" (MatchBy=Tag) that satisfies this entry. | ||||||
| Count | Integer defaults to: 1 | The minimum number of matching blocks required within the radius. |
SpawnMarker
The id of the spawn marker (NPC/Spawn/Markers) that defines the companion NPC. While conditions hold the spawner block keeps this marker alive; the marker spawns/respawns the companion and despawns it when removed.
Type information: (Nullable) String that matches the pattern: [^\s] and is at least 1 characters long
