--- a/net/minecraft/world/entity/ai/attributes/AttributeRanged.java
+++ b/net/minecraft/world/entity/ai/attributes/AttributeRanged.java
@@ -30,6 +30,8 @@
 
     @Override
     public double a(double d0) {
+        if (d0 != d0) return getDefault(); // CraftBukkit
+
         d0 = MathHelper.a(d0, this.minValue, this.maxValue);
         return d0;
     }
