EnchantJS

Allow enchantment modifications using KubeJS

Due to the extensive use of redirects, compatibility may be poor. Use it cautiously

Allows you to modify the maxlevel of the enchantment.
Allows you to modify the minlevel of the enchantment.
Allows you to modify whether the enchantment can be applied via an enchantment table.
Allows you to modify the items that can be enchanted with this enchantment.
Allows you to modify the enchantment category

Allows you to modify the enchantmentvalue of the item.
Allows you to modify whether the item is enchantable.

A Example Script (In startup_scripts)

EnchantJSEvent.modification(event=>{
  event.modify('minecraft:power',(enchant)=>{
    enchant.setRealMaxLevel(2)
  })

  event.modify("minecraft:infinity",(enchant)=>{
    enchant.setRealMaxLevel(2)
    enchant.setRealMinLevel(1)
    enchant.setCanApplyAtEnchantingTableFn(stack=>false)
    //enchant.setCanEnchantFn(i=>true)
    //enchant.setCategory(i=>true)
    enchant.setRarity("very_rare")
  })

  event.modify("minecraft:flame",enchant=>{
    enchant.setCategory(i=>true)
  })

  event.modify("minecraft:unbreaking",enchant=>{
    enchant.setCategory(i=>true)
  })
})


ItemEvents.modification(event=>{
  event.modify("stick",item=>{
    item.setRealIsEnchantable(stack=>true)
    item.setRealGetEnchantmentValueFn(stack=>{
      return 100
    })
  })
})

The EnchantJS Team

profile avatar
  • 14
    Followers
  • 35
    Projects
  • 5.2M
    Downloads

More from yiran1457View all

  • RS Tetra project image

    RS Tetra

    • 14
    • Mods

    An addon mod bridging RS and Tetra, adding modular storage disk with customizable components.

    • 14
    • June 4, 2026
    • Mods
  • TetraModify Core project image

    TetraModify Core

    • 1.0K
    • Mods

    A lib to modify Tetra.

    • 1.0K
    • June 3, 2026
    • Mods
  • TetraOverHoning project image

    TetraOverHoning

    • 123.7K
    • Mods

    Allows you to continue accumulating honing progress after completing honing.

    • 123.7K
    • June 3, 2026
    • Mods
  • GeoTetraArmor project image

    GeoTetraArmor

    • 291.0K
    • Mods

    Add Tetra modular armor using GeckoLib models.

    • 291.0K
    • June 3, 2026
    • Mods
  • RS Tetra project image

    RS Tetra

    • 14
    • Mods

    An addon mod bridging RS and Tetra, adding modular storage disk with customizable components.

    • 14
    • June 4, 2026
    • Mods
  • TetraModify Core project image

    TetraModify Core

    • 1.0K
    • Mods

    A lib to modify Tetra.

    • 1.0K
    • June 3, 2026
    • Mods
  • TetraOverHoning project image

    TetraOverHoning

    • 123.7K
    • Mods

    Allows you to continue accumulating honing progress after completing honing.

    • 123.7K
    • June 3, 2026
    • Mods
  • GeoTetraArmor project image

    GeoTetraArmor

    • 291.0K
    • Mods

    Add Tetra modular armor using GeckoLib models.

    • 291.0K
    • June 3, 2026
    • Mods