Class TemperatureStatusLookup

java.lang.Object
com.github.thedeathlycow.thermoo.api.temperature.status.v2.TemperatureStatusLookup

public final class TemperatureStatusLookup extends Object
Provides interfaces for looking up data about temperature statuses on entities.
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    isEnabled(net.minecraft.world.entity.Entity entity, net.minecraft.core.Holder.Reference<TemperatureStatus> statusRef)
    Checks if a temperature status is enabled for the given entity.
    static boolean
    isEnabled(net.minecraft.world.entity.LivingEntity entity, net.minecraft.core.Holder.Reference<TemperatureStatus> statusRef)
    Checks if a temperature status is enabled for the given entity.
    static boolean
    setEnabled(net.minecraft.world.entity.Entity entity, net.minecraft.core.Holder.Reference<TemperatureStatus> statusRef, boolean value)
    Sets the enabled state of a temperature status for an entity.
    static boolean
    setEnabled(net.minecraft.world.entity.LivingEntity entity, net.minecraft.core.Holder.Reference<TemperatureStatus> statusRef, boolean value)
    Sets the enabled state of a temperature status for an entity.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • isEnabled

      public static boolean isEnabled(net.minecraft.world.entity.LivingEntity entity, net.minecraft.core.Holder.Reference<TemperatureStatus> statusRef)
      Checks if a temperature status is enabled for the given entity.
      Returns:
      Returns true if the status is currently enabled AND the entity's type is supported by the status selector; returns false otherwise.
    • isEnabled

      public static boolean isEnabled(net.minecraft.world.entity.Entity entity, net.minecraft.core.Holder.Reference<TemperatureStatus> statusRef)
      Checks if a temperature status is enabled for the given entity.
      Returns:
      Returns true if the status is currently enabled AND the entity's type is supported by the status selector AND the entity is an instance of LivingEntity; returns false otherwise.
    • setEnabled

      public static boolean setEnabled(net.minecraft.world.entity.LivingEntity entity, net.minecraft.core.Holder.Reference<TemperatureStatus> statusRef, boolean value)
      Sets the enabled state of a temperature status for an entity. This state is persisted.
      Returns:
      Returns true if the entity's type is supported by the status selector AND the enabled state was successfully changed; returns false otherwise.
    • setEnabled

      public static boolean setEnabled(net.minecraft.world.entity.Entity entity, net.minecraft.core.Holder.Reference<TemperatureStatus> statusRef, boolean value)
      Sets the enabled state of a temperature status for an entity. This state is persisted.
      Returns:
      Returns true if the entity's type is supported by the status selector AND the entity is an instance of LivingEntity AND the enabled state was successfully changed; returns false otherwise.