Started by
MrBelles
on
Mon, 12/14/2020 - 22:07
Topic category: Help with modding (Java Edition)
I recently made my mod have a /heal command that reset's your health to max. I wanted to know how I could use this command to heal my friends doing something like /heal @e or /heal (Playername). How would I do this? And how would I do something even more advanced like /heal @e[type=iron_golem]?
Use for each player in world procedure block as a starting point
So I have to make a seperate command for /heal @e, /heal @p etc?
No, you can do this with only procedures
If you want to heal people around you,
"For each entity as Entity iterator at x y z in square cube with size [Put the radius in which players will be affected]" do "Set health of Entity iterator to Max Health of Entity iterator"
If you want to heal all players, do,
"For each player in the current world as Entity iterator" do "Set health of Entity iterator to Max Health of Entity iterator"