Table of Contents

Class BlendedOverlayTexture

Namespace
Vintagestory.API.Client
Assembly
VintagestoryAPI.dll

Defines a texture to be overlayed on another texture. Overlay textures no longer have to be of same size. Overlays are applied in reverse order, from last to first. Open in GitHub

[DocumentAsJson]
public class BlendedOverlayTexture
Inheritance
BlendedOverlayTexture
Inherited Members
Extension Methods

Fields

Alpha

[DocumentAsJson("Optional", "255", false)]
public int Alpha

Field Value

int

AppliedTo

Index of overlay this overlay will be applied to.
Value of '0' targets base texture.
Cannot be equal or higher than index of overlay it is specified in.
Cannot target overlays with indexes '16' or higher.

[DocumentAsJson("Optional", "0", false)]
public byte AppliedTo

Field Value

byte

Base

The path to the texture to use as an overlay.

[DocumentAsJson("Required", "", false)]
public AssetLocation Base

Field Value

AssetLocation

BlendMode

The type of blend for each pixel.

[DocumentAsJson("Optional", "Normal", false)]
public EnumColorBlendMode BlendMode

Field Value

EnumColorBlendMode

OffsetX

Offsets texture by X axis by set amount of pixels.
Value must be between -2048 and 2047.

[DocumentAsJson("Optional", "0", false)]
public short OffsetX

Field Value

short

OffsetY

Offsets texture by Y axis by set amount of pixels.
Value must be between -2048 and 2047.

[DocumentAsJson("Optional", "0", false)]
public short OffsetY

Field Value

short

Methods

Clone()

public BlendedOverlayTexture Clone()

Returns

BlendedOverlayTexture

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

PackBlending()

public int PackBlending()

Returns

int

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

ToString(StringBuilder)

public void ToString(StringBuilder sb)

Parameters

sb StringBuilder

UnpackBlending(int)

public void UnpackBlending(int packed)

Parameters

packed int

UnpackBlendingToTuple(int)

public static (EnumColorBlendMode blendMode, int offsetX, int offsetY, int appliedTo) UnpackBlendingToTuple(int packed)

Parameters

packed int

Returns

(EnumColorBlendMode blendMode, int offsetX, int offsetY, int appliedTo)

Operators

operator ==(BlendedOverlayTexture, BlendedOverlayTexture)

public static bool operator ==(BlendedOverlayTexture a, BlendedOverlayTexture b)

Parameters

a BlendedOverlayTexture
b BlendedOverlayTexture

Returns

bool

operator !=(BlendedOverlayTexture, BlendedOverlayTexture)

public static bool operator !=(BlendedOverlayTexture a, BlendedOverlayTexture b)

Parameters

a BlendedOverlayTexture
b BlendedOverlayTexture

Returns

bool