Interface ThermooAttributes.SetBaseAttributeValue
- Enclosing class:
ThermooAttributes
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
-
Method Summary
Modifier and TypeMethodDescriptiondefault doublegetBaseValue(net.minecraft.world.entity.LivingEntity entity) Shorthand used for invoking this event without needing to specify the base value parameter.doublegetBaseValue(net.minecraft.world.entity.LivingEntity entity, double baseValue) Gets a base value for the event.
-
Method Details
-
getBaseValue
double getBaseValue(net.minecraft.world.entity.LivingEntity entity, double baseValue) Gets a base value for the event. If the value returned by this event is non-zero, then it will be applied to the entity as a temporary attribute modifier using theAttributeModifier.Operation.ADD_VALUEoperation.Note: the actual base value will be unaffected. To modify the base value, use
FabricDefaultAttributeRegistry. This method is simply meant to be more compatible.- Parameters:
entity- The entity to apply the attribute value to.baseValue- The value given by other listeners. Starts from 0.- Returns:
- Returns the value this listener wants to apply to the modifier.
-
getBaseValue
@NonExtendable default double getBaseValue(net.minecraft.world.entity.LivingEntity entity) Shorthand used for invoking this event without needing to specify the base value parameter. Should not be extended by listeners.- Parameters:
entity- The entity to apply the attribute value to.- Returns:
- Returns the value this listener wants to apply to the modifier.
- See Also:
-