Started by InfiniteCraft on Tue, 06/23/2020 - 16:37 Topic category: Help with Minecraft modding (Java Edition) How to see if the mob is close to the player to apply an effect ?? in procedures Jump to top “When player collides with entity” Apply effect with level x, duration x, of type x Jump to top Permalink Log in or register to post comments I'm saying if the mob is 10 blocks away from me to apply an effect that is the brightness Jump to top Permalink Log in or register to post comments https://mcreator.net/tracker/issue/47617 Jump to top Permalink Log in or register to post comments 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)) Jump to top Permalink Log in or register to post comments Fancy maths Jump to top Permalink Log in or register to post comments
“When player collides with entity” Apply effect with level x, duration x, of type x Jump to top Permalink Log in or register to post comments
I'm saying if the mob is 10 blocks away from me to apply an effect that is the brightness Jump to top Permalink Log in or register to post comments
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)) Jump to top Permalink Log in or register to post comments
“When player collides with entity”
Apply effect with level x, duration x, of type x
I'm saying if the mob is 10 blocks away from me to apply an effect that is the brightness
https://mcreator.net/tracker/issue/47617
Use sqrt(abs(x1-x2)*abs(x1-x2)+abs(y1-y2)*abs(y1-y2))
Oh,yes,remove the ABSs,because negative*negative = poositive
Fancy maths