Interface TemperatureReduction

All Known Implementing Classes:
RandomlyDodgeReduction, ReinforcingAttributeReduction, ScaledAttributeReduction

public interface TemperatureReduction
A method for reducing or adjusting temperature changes. Built in implementations currently use attributes to adjust temperature.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.Codec<TemperatureReduction>
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    applyReduction(net.minecraft.world.entity.LivingEntity target, TemperatureChange context, int temperatureChange)
    Applies a reduction in the temperature change to the target.
    com.mojang.serialization.MapCodec<? extends TemperatureReduction>
    The codec for the reduction type.
  • Field Details

  • Method Details

    • applyReduction

      int applyReduction(net.minecraft.world.entity.LivingEntity target, TemperatureChange context, int temperatureChange)
      Applies a reduction in the temperature change to the target.
      Parameters:
      target - The target being affected by the temperature change.
      context - The context of the temperature change.
      temperatureChange - The amount of the temperature change.
      Returns:
      Returns an adjusted temperature change.
    • codec

      com.mojang.serialization.MapCodec<? extends TemperatureReduction> codec()
      The codec for the reduction type. Implementors should register this codec to ThermooBuiltInRegistries.TEMPERATURE_REDUCTION_TYPE in an entry point.