Started by
Sharpblade1
on
Topic category: Help with Minecraft modding (Java Edition)
Is there a way to create create a procedure so that if the player is at a distance from an entity the player is damaged?
Topic category: Help with Minecraft modding (Java Edition)
Is there a way to create create a procedure so that if the player is at a distance from an entity the player is damaged?
You could use the "get nearest entity at xyz in square cube of type" procedure block to get the nearest player in a given radius, and then deal damage to that player.
Of course, you may want to first check that a player actually does exist within that radius, to avoid trying to deal damage to a null entity.
I have tried that, but the main problem I always run into is that it damages the entity and not the player.
I just had a thought and tested it out, it worked. Thank you for replying.
p.s If you want I can tell you what I did.