4

How to make a warden spawn 6 more wardens when it reaches half health

StupidXDR2000YT's Avatar StupidXDR2000YT4/25/24 8:43 am
5/4/2024 9:35 pm
ICanGamez's Avatar ICanGamez
Pls tell me how to do it
Posted by StupidXDR2000YT's Avatar
StupidXDR2000YT
Level 3 : Apprentice Miner
1

Create an account or sign in to comment.

3

1
05/04/2024 4:04 pmhistory
Level 42 : Master uwu
ICanGamez
ICanGamez's Avatar
OO! ok so you want to trigger a spawn when a warden is at half health? i got a solution, just not a very good one :P
So what i did was make 10 commands on repeat and it checks for varies in health around the half way mark.

execute as @e[​nbt={ Health:250.0f},type=warden] at @s unless entity @s[tag=stop] run tag @s add Spawnwardens
execute as @e[​nbt={ Health:249.0f},type=warden] at @s unless entity @s[tag=stop] run tag @s add Spawnwardens
execute as @e[​nbt={ Health:248.0f},type=warden] at @s unless entity @s[tag=stop] run tag @s add Spawnwardens
execute as @e[​nbt={ Health:247.0f},type=warden] at @s unless entity @s[tag=stop] run tag @s add Spawnwardens
execute as @e[​nbt={ Health:246.0f},type=warden] at @s unless entity @s[tag=stop] run tag @s add Spawnwardens
execute as @e[​nbt={ Health:245.0f},type=warden] at @s unless entity @s[tag=stop] run tag @s add Spawnwardens
execute as @e[​nbt={ Health:244.0f},type=warden] at @s unless entity @s[tag=stop] run tag @s add Spawnwardens
execute as @e[​nbt={ Health:243.0f},type=warden] at @s unless entity @s[tag=stop] run tag @s add Spawnwardens
execute as @e[​nbt={ Health:242.0f},type=warden] at @s unless entity @s[tag=stop] run tag @s add Spawnwardens
execute as @e[​nbt={ Health:241.0f},type=warden] at @s unless entity @s[tag=stop] run tag @s add Spawnwardens
execute as @e[​nbt={ Health:240.0f},type=warden] at @s unless entity @s[tag=stop] run tag @s add Spawnwardens

execute as @e[​tag=Spawnwardens] at @s unless entity @s[tag=stop] run summon warden
execute as @e[​tag=Spawnwardens] at @s unless entity @s[tag=stop] run summon warden
execute as @e[​tag=Spawnwardens] at @s unless entity @s[tag=stop] run summon warden
execute as @e[​tag=Spawnwardens] at @s unless entity @s[tag=stop] run summon warden
execute as @e[​tag=Spawnwardens] at @s unless entity @s[tag=stop] run summon warden
execute as @e[​tag=Spawnwardens] at @s unless entity @s[tag=stop] run summon warden

execute as @e[​tag=Spawnwardens] at @s unless entity @s[tag=stop] run tag @s add stop

There are three functions to this
1st: check health, then give take if below half way
2nd: spawn wardens, at tagged entity
3rd: if the entity does not have the stop tag give it that and it will stop with every command in there!

Goodluck with the datapack!
1
05/04/2024 9:35 pm
Level 42 : Master uwu
ICanGamez
ICanGamez's Avatar
Ok so uh... that method does not work anymore :p
it used to but if your using the latest version i would do this.

Single commands:
scoreboard objectives add Health dummy

Repeating commands:
execute as @e[type=minecraft:warden] unless entity @s[tag=stop] store result score @s Health run data get entity @s Health
execute as @e[scores={Health=..250}] unless entity @s[tag=stop] at @s run summon warden
execute as @e[scores={Health=..250}] unless entity @s[tag=stop] at @s run summon warden
execute as @e[scores={Health=..250}] unless entity @s[tag=stop] at @s run summon warden
execute as @e[scores={Health=..250}] unless entity @s[tag=stop] at @s run summon warden
execute as @e[scores={Health=..250}] unless entity @s[tag=stop] at @s run summon warden
execute as @e[scores={Health=..250}] unless entity @s[tag=stop] at @s run summon warden
execute as @e[scores={Health=..250}] unless entity @s[tag=stop] at @s run tag @s stop
2
04/25/2024 7:49 pm
Level 36 : Artisan Miner
ScotsMiser
ScotsMiser's Avatar
Looking forward to an answer (if one comes); I did not read the title as a question
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome