Table of Contents

Class SpawnConditions

Namespace
Vintagestory.API.Common.Entities
Assembly
VintagestoryAPI.dll

The spawn conditions assigned to various things.

public class SpawnConditions
Inheritance
SpawnConditions
Inherited Members
Extension Methods

Examples

"spawnconditions": {
	"worldgen": {
		"TriesPerChunk": {
			"avg": 0.1,
			"var": 0
		},
		"tryOnlySurface": true,
		"minLightLevel": 10,
		"groupSize": {
			"dist": "verynarrowgaussian",
			"avg": 3,
			"var": 4
		},
		"insideBlockCodes": [ "air", "tallgrass-*" ],
		"minTemp": 5,
		"maxTemp": 28,
		"minRain": 0.45,
		"minForest": 0.35,
		"companions": [ "pig-wild-female", "pig-wild-piglet" ]
	},
	"runtime": {
		"group": "neutral",
		"tryOnlySurface": true,
		"chance": 0.0006,
		"maxQuantity": 4,
		"minLightLevel": 10,
		"groupSize": {
			"dist": "verynarrowgaussian",
			"avg": 3,
			"var": 4
		},
		"insideBlockCodes": [ "air", "tallgrass-*" ],
		"minTemp": 5,
		"maxTemp": 28,
		"minRain": 0.45,
		"minForestOrShrubs": 0.35,
		"companions": [ "pig-wild-female", "pig-wild-piglet" ]
	}
}

Fields

Climate

Recommended None Control specific spawn conditions based on climate. Note that this will override any climate values set in Runtime and Worldgen. It is recommended to specify climate values here rather than setting them in the other spawn conditions.

public ClimateSpawnCondition Climate

Field Value

ClimateSpawnCondition

Runtime

Recommended None Runtime requirements for the object to spawn.

public RuntimeSpawnConditions Runtime

Field Value

RuntimeSpawnConditions

Worldgen

Recommended None Worldgen/region requirements for the object to spawn.

public WorldGenSpawnConditions Worldgen

Field Value

WorldGenSpawnConditions

Methods

Clone()

public SpawnConditions Clone()

Returns

SpawnConditions