Interface ItemLegacyPrototype

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

interface ItemLegacyPrototype {
    getArmorFuncs?: ((item: null) => IArmorJSCallback);
    getCategory?: ((item: null) => number);
    getDefineParams?: ((item: null) => ItemParams | FoodParams | ArmorParams);
    getEnchant?: ((item: null) => number);
    getMaxDamage?: ((item: null) => number);
    getMaxUseDuration?: ((item: null) => number);
    getName: ((item: null) => string);
    getProperties?: ((item: null) => object);
    getTexture: ((item: null) => TextureData);
    getToolMaterial?: ((item: null) => string | ToolMaterial);
    getToolPrototype?: ((item: null) => ToolParams);
    getToolTarget?: ((item: null) => string[]);
    getUseAnimation?: ((item: null) => number);
    init?: (() => void);
    isEnchanted?: ((item: null) => boolean);
    isStackedByData?: ((item: null) => boolean);
    isToolRender?: ((item: null) => boolean);
    onThrowableImpact?: ((projectile: number, item: ItemInstance, target: ProjectileHitTarget) => void);
    onTick?: ((item: null) => void);
    onUsed?: ((coords: Vector, item: ItemInstance, block: Tile) => void);
    type:
        | "createItem"
        | "createFoodItem"
        | "createArmorItem"
        | "createThrowableItem";
}

Properties

getArmorFuncs?: ((item: null) => IArmorJSCallback)
getCategory?: ((item: null) => number)
getDefineParams?: ((item: null) => ItemParams | FoodParams | ArmorParams)
getEnchant?: ((item: null) => number)
getMaxDamage?: ((item: null) => number)
getMaxUseDuration?: ((item: null) => number)
getName: ((item: null) => string)
getProperties?: ((item: null) => object)

Cannot be used, because of properties should be passed as string, but properties here internally depends on object.

getTexture: ((item: null) => TextureData)
getToolMaterial?: ((item: null) => string | ToolMaterial)
getToolPrototype?: ((item: null) => ToolParams)
getToolTarget?: ((item: null) => string[])
getUseAnimation?: ((item: null) => number)
init?: (() => void)
isEnchanted?: ((item: null) => boolean)
isStackedByData?: ((item: null) => boolean)
isToolRender?: ((item: null) => boolean)
onThrowableImpact?: ((projectile: number, item: ItemInstance, target: ProjectileHitTarget) => void)
onTick?: ((item: null) => void)

Unused at all.

onUsed?: ((coords: Vector, item: ItemInstance, block: Tile) => void)
type:
    | "createItem"
    | "createFoodItem"
    | "createArmorItem"
    | "createThrowableItem"

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