Minecraft Data Packs / Other

Damage generator

  • check_circle Functions
  • 1,295 views, 2 today
  • 21 downloads, 0 today
  • 1
  • 1
  • 3
senba1209's Avatar senba1209
Level 29 : Expert 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
CompatibilityMinecraft 1.17
toMinecraft 1.18
Tags

Create an account or sign in to comment.

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

/data merge storage senba.damage {damage:500}
/execute as @s run function senba.damage main
2
10/02/2021 7:35 pm
Level 10 : Journeyman Warrior
Eratak
Eratak's Avatar
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
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome