Table of Contents

Class LayeredVoxelRecipe<T>

Namespace
Vintagestory.API.Common
Assembly
VintagestoryAPI.dll
public abstract class LayeredVoxelRecipe<T> : RecipeBase<T>, IRecipeBase<T>

Type Parameters

T
Inheritance
LayeredVoxelRecipe<T>
Implements
Inherited Members
Extension Methods

Constructors

LayeredVoxelRecipe()

public LayeredVoxelRecipe()

Fields

Pattern

public string[][] Pattern

Field Value

string[][]

Voxels

public bool[,,] Voxels

Field Value

bool[,,]

Properties

QuantityLayers

public abstract int QuantityLayers { get; }

Property Value

int

RecipeCategoryCode

public abstract string RecipeCategoryCode { get; }

Property Value

string

RotateRecipe

protected virtual bool RotateRecipe { get; set; }

Property Value

bool

Methods

FromBytes(BinaryReader, IWorldAccessor)

Deserializes the alloy

public void FromBytes(BinaryReader reader, IWorldAccessor resolver)

Parameters

reader BinaryReader
resolver IWorldAccessor

GenVoxels()

Generates the voxels for the recipe.

public void GenVoxels()

GetNameToCodeMapping(IWorldAccessor)

Resolves Wildcards in the ingredients

public override Dictionary<string, string[]> GetNameToCodeMapping(IWorldAccessor world)

Parameters

world IWorldAccessor

Returns

Dictionary<string, string[]>

Resolve(IWorldAccessor, string)

Resolves the recipe.

public override bool Resolve(IWorldAccessor world, string sourceForErrorLogging)

Parameters

world IWorldAccessor
sourceForErrorLogging string

Returns

bool

ToBytes(BinaryWriter)

Serialized the recipe

public void ToBytes(BinaryWriter writer)

Parameters

writer BinaryWriter

WildCardMatch(AssetLocation, AssetLocation)

Matches the wildcards for the clay recipe.

public static bool WildCardMatch(AssetLocation wildCard, AssetLocation blockCode)

Parameters

wildCard AssetLocation
blockCode AssetLocation

Returns

bool