@Override protected boolean canContinueAction() { return !NativeInterfaces.NAVIGATION.METHOD_ISNOTMOVING.invoke( this.mob.nmsEntity.getNavigation()) && (NativeInterfaces.ENTITY.METHOD_GETDISTANCETOENTITYSQUARED.invoke( this.mob.nmsEntity, this.action.target) > this.action.minimumDistanceSquared); }
@Override protected boolean canStartAction() { this.mob.adjustMaximumNavigationDistance( (float) Math.sqrt( NativeInterfaces.ENTITY.METHOD_GETDISTANCETOENTITYSQUARED.invoke( this.mob.nmsEntity, action.target))); final PathEntity path = NativeInterfaces.NAVIGATION.METHOD_CREATEPATHTOENTITY.invoke( this.mob.nmsEntity.getNavigation(), this.action.target); if (path == null) return false; this.path = path; return true; }
@Override protected boolean isActionRequired() { return NativeInterfaces.ENTITY.METHOD_GETDISTANCETOENTITYSQUARED.invoke( this.mob.nmsEntity, action.target) > action.maximumDistanceSquared; }