PickupObject
ThaumielMapEditor.API.Blocks.ServerObjects
Overviewβ
Propertiesβ
| Name | Type | Access | Description |
|---|---|---|---|
IsInfinite | bool | get | Whether this pickup should be treated as infinite (no depletion). |
ItemToSpawn | ItemType | get | The type of item that this pickup will spawn. |
MaxAmount | UInt32 | get | Maximum stack/amount that the spawned pickup can contain. |
ObjectType | ObjectType | get set | Gets or sets the type of the object represented by this instance. |
SpawnPercentage | float | get | Chance (0-100) that this pickup will actually spawn when processed. |
Methodsβ
| Signature | Returns | Description |
|---|---|---|
ParseValues(SerializableObject) | void | Parse pickup-specific values from a `ThaumielMapEditor.API.Serialization.Seriali⦠|
SpawnObject(SchematicData, SerializableObject) | void | Spawns the specified ThaumielMapEditor.API.Blocks.ServerObject into the server⦠|
Propertiesβ
IsInfiniteβ
Type: boolβAccess: get
Whether this pickup should be treated as infinite (no depletion).
ItemToSpawnβ
Type: ItemTypeβAccess: get
The type of item that this pickup will spawn.
MaxAmountβ
Type: UInt32βAccess: get
Maximum stack/amount that the spawned pickup can contain.
ObjectTypeβ
Type: ObjectTypeβAccess: get set
Gets or sets the type of the object represented by this instance.
SpawnPercentageβ
Type: floatβAccess: get
Chance (0-100) that this pickup will actually spawn when processed.
Methodsβ
ParseValuesβ
public void ParseValues(SerializableObject serializable)
Parse pickup-specific values from a ThaumielMapEditor.API.Serialization.SerializableObject. Validates that the serializable is a pickup and extracts
Parametersβ
| Name | Type | Description |
|---|---|---|
serializable | SerializableObject | The serialized object to read values from. |
SpawnObjectβ
public void SpawnObject(
SchematicData schematic,
SerializableObject serializable
)
Spawns the specified ThaumielMapEditor.API.Blocks.ServerObject into the server and adds it to the provided ThaumielMapEditor.API.Data.SchematicData's ThaumielMapEditor.API.Data.SchematicData.SpawnedServerObjects list.
Parametersβ
| Name | Type | Description |
|---|---|---|
schematic | SchematicData | |
serializable | SerializableObject |