KubeJS Iron's Spells
模组属性评比

距离显示结果还剩5票~

路过的这位少侠,你觉得这款Mod怎么样,可否愿意来评一评它呢?登录并评比
更新日志
  • 暂无日志..

历史编辑记录更多
    管理组申请

      暂无管理组..

    编辑组申请

      暂无编辑组..

    开发组申请

      暂无开发组..

    活跃
    开源

    KubeJS Iron's Spells

    0.0

    无人问津

    昨日指数: 12
    昨日平均指数: 86.130

    967

    总浏览

    --

    资料填充率


    如何下载?
    • 概述

      本模组为 KubeJS 添加了 Iron's Spells 'n Spellbooks 的法术书及咒语的自定义添加。

      计划功能

      • 可以访问 Iron's Spells 'n Spellbooks 中的事件,例如 ChangedManaEvent 与 SpellCastEvent;

      • 可以在其他事件中获取到玩家的魔力值;

      • 可以添加更多法术。

      使用示例

      StartupEvents.registry('irons_spellbooks:spells', event => {
      event.create('bloodfed')
      .setCastTime(60)                           // Sets the cast time
      .setCooldownSeconds(10)                    // Sets the cooldown in seconds
      .setManaCostPerLevel(20)                   // Sets the mana cost per level
      .setCastType('continuous')                 // Sets the cast type
      .setSchool('irons_spellbooks:blood')       // Sets the school
      .setMinRarity('epic')                      // Sets the minimal rarity
      .setMaxLevel(2)                            // Sets the maximum level
      .setStartSound('item.honey_bottle.drink')  // Sets the start sound
      .setFinishSound('item.honey_bottle.drink') // Sets the finish sound
      .onCast(ctx => global.bloodfed(ctx))       // Calls global.bloodfed when the spell is casted})global.bloodfed = (/** @type {Internal.CustomSpell$CastContext} */ ctx) => {
      let /** @type {Internal.ServerPlayer} */ player = ctx.entityif ((player.getFoodData().getFoodLevel() * (ctx.getSpellLevel() / 2)) < 2
      || !ctx.entity.isPlayer()) return
      player.heal(ctx.getSpellLevel() / 2)
      player.getFoodData().setFoodLevel(player.getFoodData().getFoodLevel() - 2 * (ctx.getSpellLevel() / 2))}

    短评加载中..