Interface BlockLegacyPrototype

Once upon a time, a new way of registering blocks, however, in current state, either does not work or is undesirable to use.

interface BlockLegacyPrototype {
    getCategory?: ((item: null) => number);
    getDestroyLevel?: ((item: null) => number);
    getDrop?: ((coords: Vector, id: number, data: number, diggingLevel: number, enchant: any) => ItemInstanceArray[]);
    getEnchant?: ((item: null) => number);
    getMaterial?: ((item: null) => number);
    getProperties?: ((item: null) => object);
    getShape?: ((item: null) => number[]);
    getSpecialType?: ((item: null) => SpecialType);
    getVariations: ((item: null) => BlockVariation[]);
    init?: (() => void);
    isEnchanted?: ((item: null) => boolean);
    isStackedByData?: ((item: null) => boolean);
    onItemUsed?: ((coords: Vector, item: ItemInstance, block: Tile) => void);
    onPlaced?: ((coords: Vector, item: ItemInstance, block: Tile) => void);
    type: "createBlock" | "createBlockWithRotation";
}

Hierarchy (view full)

Properties

getCategory?: ((item: null) => number)

Unused at all.

getDestroyLevel?: ((item: null) => number)
getDrop?: ((coords: Vector, id: number, data: number, diggingLevel: number, enchant: any) => ItemInstanceArray[])
getEnchant?: ((item: null) => number)

Unused at all.

getMaterial?: ((item: null) => number)
getProperties?: ((item: null) => object)

Unused at all.

getShape?: ((item: null) => number[])
getSpecialType?: ((item: null) => SpecialType)
getVariations: ((item: null) => BlockVariation[])
init?: (() => void)
isEnchanted?: ((item: null) => boolean)

Unused at all.

isStackedByData?: ((item: null) => boolean)

Unused at all.

onItemUsed?: ((coords: Vector, item: ItemInstance, block: Tile) => void)

Unused at all.

onPlaced?: ((coords: Vector, item: ItemInstance, block: Tile) => void)

Incorrect function, it will considered as BlockLegacyPrototype.getDrop

type: "createBlock" | "createBlockWithRotation"

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