public boolean isWithinDistance(Location loc){
  double dx=Math.abs(location.getX() - loc.getX());
  double dz=Math.abs(location.getZ() - loc.getZ());
  return loc.getWorld() == getWorld() && dx <= server.getViewDistance() * GlowChunk.WIDTH && dz <= server.getViewDistance() * GlowChunk.HEIGHT;
}

public boolean isWithinDistance ( Location loc ) { double dx = Math . abs ( location . getX ( ) - loc . getX ( ) ) ; double dz = Math . abs ( location . getZ ( ) - loc . getZ ( ) ) ; return loc . getWorld ( ) == getWorld ( ) && dx <= server . getViewDistance ( ) * GlowChunk . WIDTH && dz <= server . getViewDistance ( ) * GlowChunk . HEIGHT ; }
checks if this entity is within the visible radius of a location .
