Table of Contents

Class CompositeTexture

Namespace
Vintagestory.API.Client
Assembly
VintagestoryAPI.dll

Holds data about a texture. Also allows textures to be overlayed on top of one another. Open in GitHub

[DocumentAsJson]
public class CompositeTexture
Inheritance
CompositeTexture

Examples

"textures": {
	"charcoal": { "base": "block/coal/charcoal" },
	"coke": { "base": "block/coal/coke" },
	"ore-anthracite": { "base": "block/coal/anthracite" },
	"ore-lignite": { "base": "block/coal/lignite" },
	"ore-bituminouscoal": { "base": "block/coal/bituminous" },
	"ember": { "base": "block/coal/ember" }
},
"textures": {
	"ore": {
		"base": "block/stone/rock/{rock}1",
		"overlays": [ "block/stone/ore/{ore}1" ]
	}
},

Connected textures example (See https://discord.com/channels/302152934249070593/479736466453561345/1134187385501007962)

"textures": {
 	"all": {
 		"base": "block/stone/cobblestone/tiling/1",
 		"tiles": [
 			{ "base": "block/stone/cobblestone/tiling/*" }
 		],
 		"tilesWidth": 4
 	}
 }

Fields

Base (Required)

The basic texture for this composite texture

[DocumentAsJson]
public AssetLocation Base

Field Value

AssetLocation

Alpha (Optional) (Default: 255)

Can be used to modify the opacity of the texture. 255 is fully opaque, 0 is fully transparent.

[DocumentAsJson]
public int Alpha

Field Value

int

Alternates (Optional) (Default: None)

The texture may consists of any amount of alternatives, one of which will be randomly chosen when the block is placed in the world.

[DocumentAsJson]
public CompositeTexture[] Alternates

Field Value

CompositeTexture[]

BlendedOverlays (Optional) (Default: None)

A set of textures to overlay above this texture. The base texture may be overlayed with any quantity of textures. These are baked together during texture atlas creation.

[DocumentAsJson]
public BlendedOverlayTexture[] BlendedOverlays

Field Value

BlendedOverlayTexture[]

Rotation (Optional) (Default: 0)

Rotation of the texture may only be a multiple of 90

[DocumentAsJson]
public int Rotation

Field Value

int

Tiles (Optional) (Default: None)

A way of basic support for connected textures. Textures should be named numerically from 1 to TilesWidth squared.
E.g., if TilesWidth is 3, the order follows the pattern of:
1 2 3
4 5 6
7 8 9

[DocumentAsJson]
public CompositeTexture[] Tiles

Field Value

CompositeTexture[]

TilesWidth (Optional) (Default: 0)

The number of tiles in one direction that make up the full connected textures defined in Tiles.

[DocumentAsJson]
public int TilesWidth

Field Value

int

Overlays (Obsolete)

Obsolete. Use BlendedOverlays instead.

[DocumentAsJson]
public AssetLocation[] Overlays { set; }

Field Value

AssetLocation[]