Class TemperatureStatusLookup
java.lang.Object
com.github.thedeathlycow.thermoo.api.temperature.status.v2.TemperatureStatusLookup
Provides interfaces for looking up data about temperature statuses on entities.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisEnabled(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 booleanisEnabled(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 booleansetEnabled(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 booleansetEnabled(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.
-
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
trueif the status is currently enabled AND the entity's type is supported by the status selector; returnsfalseotherwise.
-
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
trueif the status is currently enabled AND the entity's type is supported by the status selector AND theentityis an instance ofLivingEntity; returnsfalseotherwise.
-
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
trueif the entity's type is supported by the status selector AND the enabled state was successfully changed; returnsfalseotherwise.
-
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
trueif the entity's type is supported by the status selector AND theentityis an instance ofLivingEntityAND the enabled state was successfully changed; returnsfalseotherwise.
-