How to see if the mob is close to the player to apply an effect ?? in procedures

Started by InfiniteCraft on

Topic category: Help with Minecraft modding (Java Edition)

Joined May 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to see if the mob is close to the player to apply an effect ?? in procedures

How to see if the mob is close to the player to apply an effect ??

in procedures

Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
“When player collides with…
Thu, 06/25/2020 - 14:31

“When player collides with entity” 

 

Apply effect with level x, duration x, of type x 

Joined May 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm saying if the mob is 10…
Thu, 06/25/2020 - 16:42

I'm saying if the mob is 10 blocks away from me to apply an effect that is the brightness

Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Use sqrt(abs(x1-x2)*abs(x1…
Mon, 06/29/2020 - 04:31

Use sqrt(abs(x1-x2)*abs(x1-x2)+abs(y1-y2)*abs(y1-y2))

Oh,yes,remove the ABSs,because negative*negative = poositive

sqrt(abs(x1-x2)*abs(x1-x2)+abs(y1-y2)*abs(y1-y2))