Table of Contents

Class ContainedTextureSource

Namespace
Vintagestory.API.Client
Assembly
VintagestoryAPI.dll

Helper class for implementors of ITexPositionSource

public class ContainedTextureSource : ITexPositionSource
Inheritance
ContainedTextureSource
Implements
Inherited Members
Extension Methods

Constructors

ContainedTextureSource(ICoreClientAPI, ITextureAtlasAPI, Dictionary<string, AssetLocation>, string)

public ContainedTextureSource(ICoreClientAPI capi, ITextureAtlasAPI targetAtlas, Dictionary<string, AssetLocation> textures, string sourceForErrorLogging)

Parameters

capi ICoreClientAPI
targetAtlas ITextureAtlasAPI
textures Dictionary<string, AssetLocation>
sourceForErrorLogging string

Fields

Textures

public Dictionary<string, AssetLocation> Textures

Field Value

Dictionary<string, AssetLocation>

Properties

AtlasSize

This returns the size of the atlas this texture resides in.

public Size2i AtlasSize { get; }

Property Value

Size2i

this[string]

public TextureAtlasPosition this[string textureCode] { get; }

Parameters

textureCode string

Property Value

TextureAtlasPosition

Methods

getOrCreateTexPos(AssetLocation)

protected TextureAtlasPosition getOrCreateTexPos(AssetLocation texturePath)

Parameters

texturePath AssetLocation

Returns

TextureAtlasPosition