I'm making a small datapack and I have trouble with giving health boost on the player. Unlike other effects, having the command /effect give @a[level=100..199] minecraft:health_boost 60 0 true
always active will keep resetting the life of the extra hearts. Is there a way to make it so when the player has between 100 to 199 levels, the player will have the health boost effect?
Asked
Active
Viewed 107 times
0

SuperStormer
- 4,997
- 5
- 25
- 35

Alex
- 21
- 1
1 Answers
0
I would assume something as simple as this would work. I think the problem you had is that the duration you were providing was 0, which meant the effect would last for less than or about a tick. This would result in a blinking effect, like you were describing
effect give @a[level=100..199] health_boost 60 1
I'm also a little confused by your question. If this is not what you are looking for, please let me know.

AwesomeDude3247
- 98
- 10
-
The command you suggested is working with every other effect in the game except for the effects health boost and absorption. That happens because those 2 are working a bit different. The health boost effect when given to the player will give him extra hearts on top oh his health. Those hearts however start empty and that is were this command has the issue. When the natural regen starts to fill up the hearts the command keeps giving the effect to the player resetting those hearts and causes the screen to shake. This is why I need the command to activate only once. – Alex Mar 23 '21 at 00:22
-
Try giving them health boost then after that, instant health – AwesomeDude3247 Mar 23 '21 at 00:51