#I want the endermans and the bees spawn in anger, and when some mob are close to me apply an effect

1 messages · Page 1 of 1 (latest)

mighty depot
#

I've been trying to do this but I just can't, need help, I've run out of ideas on how to do it, I'm not an expert at making datapacks and I'm having a hard time doing this.

I need a way that when a mob is nearby it applies an effect such as hunger or any other effect.

Sorry if this is too much:(

mighty depot
#

I want the endermans and the bees spawn in anger, and when some mob are close to me apply an effect

foggy dirge
#

If you just need the trigger for that, you can use the command: execute as <player> at @s if entity @e[type=taglib:monster, distance=..10] run effect...

foggy dirge
#

Spawning mobs in anger is afaik only possible when you set a specific uuid (the entity they target)

icy kelp
#

Ya when you summon an enderman or bee, you can set the AngryAt property:
summon minecraft:enderman ~ ~ ~ {Tags:[anger_target]}
execute as @p run data modify entity @e[tag=anger_target,limit=1] AngryAt set from entity @s UUID