Data Packs Other

Damage generator

  • 1.6k views 0 today
  • save_alt 23 downloads
Compatibility
Minecraft 1.17
to version
Minecraft 1.18
Changes include
  • Functions
  • 1
  • 1
  • 3
senba1209
Lvl 29Expert Miner
9
Note: This article was written using Google Translate

The damage done by this function can be affected by the effects of armor and potions.


<How to use>
/data merge storage senba.damage {damage: ~~~, armor_rate: 0 ~ 100, effect_rate: 0 ~ 100, motion: 0b / 1b, hurt_particle: 0b / 1b, blood_particle: 0b / 1b}
/ execute as @ target run function senba.damage main
Inflicts damage on execution of

<Expansion list>
damage: No. [600]
Substitute by multiplying the damage given by 100 times
If the value is too large, it may hit the limit value of the scoreboard during the calculation and the damage may not pass normally.
Due to a bug in Micra's specifications, "because you can't operate with less than 1 health", you will be killed if your health is less than 1 during calculation.
armor_rate: 0 ~ 100 [0]
Armor damage cut rate. Can be set in the range of 0 to 100
If it is 0, it is as it is. If it is 100, the armor is 0.0 times (invalid).
effect_rate: 0 ~ 100 [0]
Cut ratio of resistance effect. Can be set in the range of 0 to 100
If it is 0, it is as it is. If it is 100, the armor is 0.0 times (invalid).
motion: 0b / 1b [1b]
Whether to take damage motion. When creating a death log or damage source, etc.
real_damage: 0b / 1b [1b]
The target is automatically set to MOB only, and the end crystal will explode.
hurtparticle: 0b / 1b [0b]
Whether to emit damaged particles. You will get 1 heart for each damage
blood_particle: 0b / 1b [0b]
Whether to emit blood particles. 3 drops of blood per damage

* If nothing is specified, the result will be in [ ].

I used Ai Akaishi's library to damage the player.
AI Akaishi's twitter 赤石愛@AITuber (@AkaishiAiTuber) / Twitter

Do not modify this data pack.
But distribution in your data pack is OK.

My twitter せんば♑ ☭🍁🍥� (@Senba_1209) / Twitter

More like this

  Have something to say?

Eratak
10/01/2021 8:38 pm
Level 10 : Journeyman Warrior
ok, I don't get it lol
1
senba1209
10/02/2021 1:43 am
Level 29 : Expert Miner
oh?Are there any command typos?

/data merge storage senba.damage {damage:500}
/execute as @s run function senba.damage main
1
Eratak
10/02/2021 7:35 pm
Level 10 : Journeyman Warrior
it was probably just because the descirption was made using google translate which obviously isn't always reliable and I had trouble understanding what it actually does
2

Welcome