Options
All
  • Public
  • Public/Protected
  • All
Menu

Object returned by CustomEnchant.newEnchant method. Used to configure different custom enchantment behaviors

Hierarchy

  • EnchantSetupInterface

Index

Properties

id: number

The numeric id of the following enchantment to be used in different operations. This id will not change after the first generation, same as it works with blocks' and items' ids.

Methods

  • Defines the function that will be called, when item with following enchantment is used for attack. The function must return bonus damage dealt to the victim. NOTE: this method is highly experimental right now

    Parameters

    Returns EnchantSetupInterface

    reference to itself to be used in sequential calls

  • Sets the following enchantment frequency, possibly used in treasures. Default value is 3

    Parameters

    • freq: number

    Returns EnchantSetupInterface

    reference to itself to be used in sequential calls

  • Sets whether the following enchantment will be able to be received on the enchanting table or not. Default value is true.

    Parameters

    • discoverable: boolean

    Returns EnchantSetupInterface

    reference to itself to be used in sequential calls

  • Sets whether the following enchantment will be able to be found in dungeon chests or not. Default value is true.

    Parameters

    • lootable: boolean

    Returns EnchantSetupInterface

    reference to itself to be used in sequential calls

  • Sets whether the following enchantment will be able to be caught during fishing as a treasure, or not. Default value is false.

    Parameters

    • treasure: boolean

    Returns EnchantSetupInterface

    reference to itself to be used in sequential calls

  • Sets the mask of items, that the following enchantment can be applied to, paired parameter for item is enchant slot, default is -1 = 0xFFFFFFFF - all

    Parameters

    • mask: number

    Returns EnchantSetupInterface

    reference to itself to be used in sequential calls

  • Sets linear dependency of enchant cost by level, the formula is level * b + c

    Parameters

    • bMin: number
    • cMin: number
    • bMax: number
    • cMax: number

    Returns EnchantSetupInterface

    reference to itself to be used in sequential calls

  • Sets minimum and maximum level, that the following enchantment will be able to have in legal conditions. Default is 1-5

    Parameters

    • min: number
    • max: number

    Returns EnchantSetupInterface

    reference to itself to be used in sequential calls

  • Defines the function that will be called after the item with following enchantment is used for attack. NOTE: this method is highly experimental right now

    Parameters

    Returns EnchantSetupInterface

    reference to itself to be used in sequential calls

  • Defines the function that will be called, when the entity wearing item with following enchantment, is hit. NOTE: this method is highly experimental right now

    Parameters

    Returns EnchantSetupInterface

    reference to itself to be used in sequential calls

  • Defines the function that will be called, when the entity wearing item with following enchantment, is hit. The function must return bonus protection value. NOTE: this method is highly experimental right now

    Parameters

    Returns EnchantSetupInterface

    reference to itself to be used in sequential calls

Generated using TypeDoc