All Known Implementing Classes:
EnvironmentAwareEntityMixin

public interface Soakable
Soakable entities are things that can get wet. Wetness can increase when in the rain, swimming, or splashed with a water bottle. This is not related to thirst, instead is just how wet an entity is.

This class is interface injected into LivingEntity. Therefore, ALL methods must have a default implementation. Methods that should normally be abstract should throw a NotImplementedException instead of being declared abstract.

  • Method Details

    • thermoo$setWetTicks

      default void thermoo$setWetTicks(int amount)
      Sets the wet ticks of a soakable to an exact amount.

      Clamps the amount between 0 and max wet ticks before setting.

      Parameters:
      amount - The amount of wet ticks
    • thermoo$getWetTicks

      default int thermoo$getWetTicks()
      Returns:
      Returns the wet ticks of the soakable
    • thermoo$getMaxWetTicks

      default int thermoo$getMaxWetTicks()
      Returns:
      Returns the maximum wet ticks the soakable can have
    • thermoo$ignoresFrigidWater

      default boolean thermoo$ignoresFrigidWater()
      Soakables ignore frigid water if they can breathe in water.
      Returns:
      Returns if the soakable ignores the effects of frigid water
    • thermoo$isWet

      default boolean thermoo$isWet()
      Returns:
      Returns if the soakable has a positive number of wet ticks
    • thermoo$addWetTicks

      default void thermoo$addWetTicks(int delta)
    • thermoo$isSoaked

      default boolean thermoo$isSoaked()
      Returns:
      Returns if the soakable's current wet ticks is greater than or equal to its maximum wet ticks
    • thermoo$getSoakedScale

      default float thermoo$getSoakedScale()
      Returns:
      Returns the current wet ticks of the soakable as a percentage scale of the max wet ticks on a 0-1 scale.