Appearance
twine / CustomItem
Function: CustomItem() โ
CustomItem(
meta):ClassDecorator
Defined in: twine/src/item/decorators.ts:32
Declares an item. The class is the item: pass it wherever helix takes one, and put it in a module's imports. Its behaviour goes in modules, as @OnUse(Item) and friends.
ts
@CustomItem({ name: "fire_arrow", item: FIRE_ARROW,
recipe: (self) => RecipeDef.shapeless([...eight, "minecraft:blaze_powder"], self, 8) })
export class FireArrow {}
ctx.playerGive(sel, FireArrow, 16);Gets a public <name>/give, and give_upgrades when it takes upgrades. Its upgrades come with it.
Parameters โ
meta โ
Returns โ
ClassDecorator