Started by
Dogis
on
Topic category: Help with Minecraft modding (Java Edition)
Hello, I would like to make a mob that will give you an effect (e.g. strength or regeneration) when you are nearby (e.g. 6 blocks). I made this mob follow the player after taming, and when it follows the player, it will give him this effect. I hope I explained everything well
Edited by Dogis on Tue, 07/12/2022 - 19:02
To check if mob is nearby you can use block "Get nearest entity at x y z in square cube with size _ of type". It'll give you nearest entity.
And run on player tick update.
Eventually there should be block:
"For each entity as _ at x: y: z: in square cube with size _ 4 do _"
It'll loop through all entities in set range.