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.

@FunctionalInterface public static interface ThermooAttributes.SetBaseAttributeValue
  • Method Summary

    Modifier and Type
    Method
    Description
    default double
    getBaseValue(net.minecraft.world.entity.LivingEntity entity)
    Shorthand used for invoking this event without needing to specify the base value parameter.
    double
    getBaseValue(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 the AttributeModifier.Operation.ADD_VALUE operation.

      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: