mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 10:46:05 +03:00
21 lines
799 B
Diff
21 lines
799 B
Diff
--- ../src-base/minecraft/net/minecraft/entity/ai/attributes/RangedAttribute.java
|
|
+++ ../src-work/minecraft/net/minecraft/entity/ai/attributes/RangedAttribute.java
|
|
@@ -6,7 +6,7 @@
|
|
public class RangedAttribute extends BaseAttribute
|
|
{
|
|
private final double minimumValue;
|
|
- private final double maximumValue;
|
|
+ public double maximumValue; // Spigot
|
|
private String description;
|
|
|
|
public RangedAttribute(@Nullable IAttribute parentIn, String unlocalizedNameIn, double defaultValue, double minimumValueIn, double maximumValueIn)
|
|
@@ -42,6 +42,8 @@
|
|
|
|
public double clampValue(double value)
|
|
{
|
|
+ if (value != value) return getDefaultValue(); // CraftBukkit
|
|
+
|
|
value = MathHelper.clamp(value, this.minimumValue, this.maximumValue);
|
|
return value;
|
|
}
|