Table of Contents

Interface IBuildableAsset<TInstance>

Namespace
Vintagestory.API.Common
Assembly
VintagestoryAPI.dll

Interface for buildable asset types.

public interface IBuildableAsset<out TInstance>

Type Parameters

TInstance

The instance type that is built from this asset

Extension Methods

Properties

Id

string Id { get; set; }

Property Value

string

Methods

Build()

Builds a TInstance from this asset.

TInstance Build()

Returns

TInstance

Build(Entity, JsonObject)

Builds a TInstance from this asset for a specific entity.

TInstance Build(Entity entity, JsonObject entityJson)

Parameters

entity Entity

The entity that owns the instance

entityJson JsonObject

The subobject (from the entity's JSON data) that references this asset (if any). This can be used to override or configure certain aspects of the asset on a per-entity basis.

Returns

TInstance

The built instance