在生物頭上顯示血量等資訊。

Display blood volume and other information on the head of the creature.

最後測試使用插件版本:1.16.11

Finally test the plugin version:1.16.11

Action:


因為只需要顯示一個,所以必須用mark標記,不然會出現好幾個。

Because only one needs to be displayed, it must be marked with a mark, otherwise several will appear.

Action:

- Action[a=EntityTopDisplayMonster;mark=&hd_target_uuid&EntityTopDisplayMonster;nt=true] ~onAttack @Target{Filters=Monster}

- Action[a=EntityTopDisplayAnimal;mark=&hd_target_uuid&EntityTopDisplayAnimal;nt=true] ~onAttack @Target{Filters=Animal}

- Action[a=EntityTopDisplayPlayer;mark=&hd_target_uuid&EntityTopDisplayPlayer;nt=true] ~onAttack @Target{Filters=Player}

在目標頭上顯示資訊。

Display information on the target head.

目標為怪物列表內的生物。

The target is the creature in the monster list.

EntityTopDisplayMonster:
  Action:
  - Loop[onStart=EntityTopDisplayMonster-Start;onTime=EntityTopDisplayMonster-Time;onEnd=EntityTopDisplayMonster-End;period=10;duration=200]

EntityTopDisplayMonster-Start:
  Action:
  - Hologram[cm=1;m=&hd_target_nowhealth&/&hd_target_maxhealth&&hd_target_monster_health_proportion&] @LocTarget{LA=0|&hd_target_height&|0}

EntityTopDisplayMonster-Time:
  Action:
  - Hologram[teleport=true] @LocTarget{LA=0|&hd_target_height&|0}
  - Hologram[cm=1;m=&hd_target_nowhealth&/&hd_target_maxhealth&&hd_target_monster_health_proportion&]
  - Break[ConditionType=Compare;cp=&hd_target_nowhealth&~0]
  - Hologram[delete=true]
  - Action[mark=&hd_target_uuid&EntityTopDisplayMonster;stop=true]

EntityTopDisplayMonster-End:
  Action:
  - Hologram[delete=true]

目標為動物列表內的生物。

The target is the creature in the animal list.