Skip to main content

PickupObject

class ThaumielMapEditor.API.Blocks.ServerObjects

Overview​

Properties​

NameTypeAccessDescription
IsInfiniteboolgetWhether this pickup should be treated as infinite (no depletion).
ItemToSpawnItemTypegetThe type of item that this pickup will spawn.
MaxAmountUInt32getMaximum stack/amount that the spawned pickup can contain.
ObjectTypeObjectTypeget setGets or sets the type of the object represented by this instance.
SpawnPercentagefloatgetChance (0-100) that this pickup will actually spawn when processed.

Methods​

SignatureReturnsDescription
ParseValues(SerializableObject)voidParse pickup-specific values from a `ThaumielMapEditor.API.Serialization.Seriali…
SpawnObject(SchematicData, SerializableObject)voidSpawns 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​

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​

NameTypeDescription
serializableSerializableObjectThe serialized object to read values from.

SpawnObject​

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​

NameTypeDescription
schematicSchematicData
serializableSerializableObject