Interface BlockVariation

Object used to represent single block variation.

interface BlockVariation {
    inCreative?: boolean;
    name?: string;
    texture: [string, number][];
}

Properties

inCreative?: boolean

If true, block variation will be added to creative inventory.

false
name?: string

Variation name, displayed as item name everywhere.

"Unknown Block"
texture: [string, number][]

Variation textures, array containing pairs of texture name and data. Texture file should be located in items-opaque folder and it's name should be in the format: "name_data", e.g. if the file name is "ingot_copper_0", you should specify an array ["ingot_copper", 0].

There should be from one to six texture pairs in the array, if less then six variations are specified, the last texture is used for missing textures. The sides go in the following order:

texture: [
["name1", index1], // bottom (Y: -1)
["name2", index2], // top (Y: +1)
["name3", index3], // back (X: -1)
["name4", index4], // front (X: +1)
["name5", index5], // left (Z: -1)
["name6", index6] // right (Z: +1)
]

Copyright © 2024 Nernar. Copyright © 2020 #mineprogramming. Built with ❤ and TypeDoc.