Interface TemperatureChangeEvents.AllowChange

Enclosing class:
TemperatureChangeEvents
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 TemperatureChangeEvents.AllowChange
  • Method Summary

    Modifier and Type
    Method
    Description
    dev.yumi.commons.TriState
    allowChange(net.minecraft.world.entity.LivingEntity target, int change, int reducedChange, TemperatureChange context)
    Whether this listener should allow a temperature point change update to apply.
  • Method Details

    • allowChange

      dev.yumi.commons.TriState allowChange(net.minecraft.world.entity.LivingEntity target, int change, int reducedChange, TemperatureChange context)
      Whether this listener should allow a temperature point change update to apply.
      Parameters:
      target - The target of the temperature change.
      change - The attempted change in temperature points prior to reduction. This value is non-zero.
      reducedChange - The actual change in temperature points after reduction. This value is non-zero.
      context - Additional context of the temperature change.
      Returns:
      Return true or false to make the update apply right away, or default to fall back to other listeners. The default behavior will be to allow the update.