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.
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
public AssetLocation Base
Field Value
Alpha (Optional) (Default: 255)
Can be used to modify the opacity of the texture. 255 is fully opaque, 0 is fully transparent.
public int Alpha
Field Value
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.
public CompositeTexture[] Alternates
Field Value
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.
public BlendedOverlayTexture[] BlendedOverlays
Field Value
Rotation (Optional) (Default: 0)
Rotation of the texture may only be a multiple of 90
public int Rotation
Field Value
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
public CompositeTexture[] Tiles
Field Value
TilesWidth (Optional) (Default: 0)
The number of tiles in one direction that make up the full connected textures defined in Tiles.
public int TilesWidth
Field Value
Properties
Overlays (Obsolete)
Obsolete. Use BlendedOverlays instead.
public AssetLocation[] Overlays { set; }