Table of Contents

Interface IAssetOrigin

Namespace
Vintagestory.API.Common
Assembly
VintagestoryAPI.dll
public interface IAssetOrigin

Properties

OriginPath

string OriginPath { get; }

Property Value

string

Methods

GetAssets(AssetCategory, bool)

Returns all assets of the given category which can be found in this origin

List<IAsset> GetAssets(AssetCategory category, bool shouldLoad = true)

Parameters

category AssetCategory
shouldLoad bool

Returns

List<IAsset>

GetAssets(AssetLocation, bool)

Returns all assets of the given base location path which can be found in this origin

List<IAsset> GetAssets(AssetLocation baseLocation, bool shouldLoad = true)

Parameters

baseLocation AssetLocation
shouldLoad bool

Returns

List<IAsset>

IsAllowedToAffectGameplay()

Resource packs are not allowed to affect gameplay

bool IsAllowedToAffectGameplay()

Returns

bool

LoadAsset(IAsset)

Loads the asset into memeory.

void LoadAsset(IAsset asset)

Parameters

asset IAsset

The asset to be loaded

TryLoadAsset(IAsset)

Attempts to load the asset. Returns false if it fails.

bool TryLoadAsset(IAsset asset)

Parameters

asset IAsset

The asset to be loaded.

Returns

bool