Package net.minecraft.entity.attribute
Class ClampedEntityAttribute
java.lang.Object
net.minecraft.entity.attribute.EntityAttribute
net.minecraft.entity.attribute.ClampedEntityAttribute
public class ClampedEntityAttribute extends EntityAttribute
Represents a type of attribute with minimum and maximum value limits.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ClampedEntityAttribute(String translationKey, double fallback, double min, double max) -
Method Summary
Modifier and Type Method Description doubleclamp(double value)Methods inherited from class net.minecraft.entity.attribute.EntityAttribute
getDefaultValue, getTranslationKey, isTracked, setTracked
-
Field Details
-
minValue
private final double minValue -
maxValue
private final double maxValue
-
-
Constructor Details
-
ClampedEntityAttribute
-
-
Method Details
-
clamp
public double clamp(double value)- Overrides:
clampin classEntityAttribute
-