Minecraft MMOItem 即死印记和取消器:详细配置教程

本文将引导你如何在 Minecraft 中使用 MMOItem 和 MythicMobs 模组创建即死印记物品和取消器,并详细讲解配置过程。

即死印记物品配置:

item:
  type: diamond
  name: '&c即死印记'
  lore:
    - '&7这个印记会在12秒后'
    - '&7让你死亡,小心使用!'
  customModelData: 1
  flags: [hide_attributes]

abilities:
  onTick:
    cancel: true # 取消物品的默认效果
    actions:
      - execute-command:
          command: "title @s times 1 20 1" # 在玩家屏幕上显示倒计时
      - delay: 240 # 12秒的倒计时
      - execute-command:
          command: "kill @s" # 超时后杀死玩家

取消即死标记的一次性物品配置:

item:
  type: paper
  name: '&a即死标记取消器'
  lore:
    - '&7使用这个物品可以'
    - '&7取消即死标记的效果'
  customModelData: 2
  flags: [hide_attributes]

abilities:
  onUse:
    cancel: true # 取消物品的默认效果
    actions:
      - execute-command:
          command: "execute as @s[tag=has_death_tag] run tag @s remove has_death_tag" # 移除即死标记
      - execute-command:
          command: "execute as @s run title @s title '&a已取消即死标记!'" # 在玩家屏幕上提示

MythicMobs 的配置:

- name: InstantDeathMob
  health: 1
  damage: 0
  experience: 0
  drops: []
  skills:
    onSpawn:
      - execute-command:
          command: "tag @s add has_death_tag" # 给怪物打上即死标记
      - item-spawn:
          item: diamond # 掉落即死印记
          amount: 1
          chance: 100
          damage: 0
    onDeath:
      - item-spawn:
          item: paper # 掉落即死标记取消器
          amount: 1
          chance: 100
          damage: 0

添加物品到游戏:

  1. 将以上配置分别写入 mmoitem.yml 和 MythicMobs 的配置文件中。
  2. 使用以下命令重新加载配置文件:
/mythicmobs reload
/mmoitem reload

现在,你就可以在游戏中找到这两个物品了。记住,使用即死印记后,需要在12秒内使用即死标记取消器来避免死亡!

Minecraft MMOItem 即死印记和取消器:详细配置教程

原文地址: https://www.cveoy.top/t/topic/natt 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录