Posted January 2, 201411 yr How do I make a mob check the distance between it and the player?(Its for a if statement)
January 2, 201411 yr There is probably a method for it, but if you have to, way not just use simple geometry? Distance between 3D points Sqrt(Dx*Dx+Dy*Dy+Dz*Dz)
January 2, 201411 yr Author oh, ok thanks I am just trying to do something like this http://prntscr.com/2ft9ae so I was wondering if there's any simple version(not the one with alot of codes) for it.
January 2, 201411 yr I'm assuming your function is passing through a parameter of EntityPlayer, so you can just use entityplayer.getDistanceSq(x, y, z) If you really want help, give that modder a thank you. Modders LOVE thank yous.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.