I want to set certain tasks for my custom mob that involve it moving to fixed coordinate (x,y,z). It's seems that the
tryMoveToXYZ(x,y,z,speed)
method works fine, but only if the mob is within 16 blocks of (x,y,z). Otherwise, it appears that the vanilla code for something like EntityAIMoveIndoors has the mob move in a random direction towards (x,y,z) a number of times until it is within 16 blocks of (x,y,z), at which point it can finally move directly. This has the unfortunate side effect of the mob following a somewhat random walk (not entirely true since the direction vectors are towards (x,y,z) but still not ideal). I suppose I could change the code in RandomPositionGenerator so that the random direction vector and desired direction vector have dot product not just positive but also large enough to ensure the angle between them is less than pi/6 or so. But this seems rather complicated for what should be a simple task. Any ideas?