实况主小博
如题,我想用进度检测玩家被带特定tag的实体伤害,但是有点问题,被所有实体攻击的时候都会解锁进度,请帮我看一下我写的有什么问题,如果不能检测tag的话也可以告诉我其他精准识别伤害来源实体的办法。
进度文件内容:
  1. {
  2.     "display": {
  3.         "icon": {
  4.             "item": "minecraft:command_block"
  5.         },
  6.         "title": {
  7.             "text":"mxzgj","color":"white","bold":false,"italic":false
  8.         },
  9.         "description": {
  10.             "text":"mxzgj","color":"white","bold":false,"italic":false
  11.         },
  12.         "show_toast": false,
  13.         "announce_to_chat": false
  14.     },
  15.         "parent":"minecraft:jc/root",
  16.     "criteria": {
  17.     "mxzgj": {
  18.       "trigger": "minecraft:entity_hurt_player",
  19.           "conditions":{
  20.           "damage":{
  21.           "direct_entity":{
  22.           "nbt":"{Tags:['mxzhand']}"
  23.           }
  24.           }
  25.           }
  26.     }
  27.   },
  28.   "rewards":{
  29.         "function":"gm:mxzgj"
  30.         }
  31. }
复制代码





CR_019
1、direct_entity改成source_entity
2、单引号改成双引号加反斜杠转义:\"

  1. {
  2.     "display": {
  3.         "icon": {
  4.             "item": "minecraft:command_block"
  5.         },
  6.         "title": {
  7.             "text":"mxzgj","color":"white","bold":false,"italic":false
  8.         },
  9.         "description": {
  10.             "text":"mxzgj","color":"white","bold":false,"italic":false
  11.         },
  12.         "show_toast": false,
  13.         "announce_to_chat": false
  14.     },
  15.         "parent":"cam:countryside_and_magic/root",
  16.     "criteria": {
  17.     "mxzgj": {
  18.       "trigger": "minecraft:entity_hurt_player",
  19.           "conditions":{
  20.           "damage":{
  21.           "source_entity":{
  22.           "nbt":"{Tags:["mxzhand"]}"
  23.           }
  24.           }
  25.           }
  26.     }
  27.   }
  28. }
复制代码



第一页 上一页 下一页 最后一页