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
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<TemperatureReduction> -
Method Summary
Modifier and TypeMethodDescriptionintapplyReduction(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> codec()The codec for the reduction type.
-
Field Details
-
DIRECT_CODEC
-
-
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 toThermooBuiltInRegistries.TEMPERATURE_REDUCTION_TYPEin an entry point.
-