Class ThermooAttributes

java.lang.Object
com.github.thedeathlycow.thermoo.api.ThermooAttributes

public final class ThermooAttributes extends Object
Custom Attributes provided by Thermoo
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final net.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute>
    The environment frost resistance of an entity.
    static final net.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute>
    The environment heat resistance of an entity.
    static final net.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute>
    The cold resistance of an entity.
    static final net.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute>
    The heat resistance of an entity.
    static final net.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute>
    A multiplier of the base max soaking ticks value of 600.
    static final net.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute>
    The maximum temperature of an entity.
    static final net.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute>
    The minimum temperature of an entity.
  • Method Summary

    Modifier and Type
    Method
    Description
    static net.fabricmc.fabric.api.event.Event<ThermooAttributes.SetBaseAttributeValue>
    baseValueEvent(net.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute> attribute)
    Gets the base value event that corresponds to the attribute given.

    Methods inherited from class java.lang.Object

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

    • MIN_TEMPERATURE

      public static final net.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute> MIN_TEMPERATURE
      The minimum temperature of an entity. By default, this is 0.

      Note that this is separate from MAX_TEMPERATURE. Each point of this attribute is decreases the minimum temperature of an entity by 140 points (140 points is the maximum number of freezing ticks that entities may have for powder snow freezing in vanilla).

      See Also:
    • MAX_TEMPERATURE

      public static final net.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute> MAX_TEMPERATURE
      The maximum temperature of an entity. By default, this is 0.

      Note that this is separate from MIN_TEMPERATURE. Each point of this attribute is increases the maximum temperature of an entity by 140 points (140 points is the maximum number of freezing ticks that entities may have for powder snow freezing in vanilla).

      See Also:
    • MAX_SOAKING_TICK_MULTIPLIER

      public static final net.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute> MAX_SOAKING_TICK_MULTIPLIER
      A multiplier of the base max soaking ticks value of 600. By default, this is 1.

      The final max soaking tick value for living entities is floor(600 * multiplier).

    • FROST_RESISTANCE

      public static final net.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute> FROST_RESISTANCE
      The cold resistance of an entity. 1 point of frost resistance corresponds to a 10% cold reduction
      See Also:
    • HEAT_RESISTANCE

      public static final net.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute> HEAT_RESISTANCE
      The heat resistance of an entity. 1 point of heat resistance corresponds to a 10% heat reduction
      See Also:
    • ENVIRONMENT_HEAT_RESISTANCE

      public static final net.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute> ENVIRONMENT_HEAT_RESISTANCE
      The environment heat resistance of an entity. It is used ONLY for environment temperature changes.

      Positive values provides a random chance of "dodging" a temperature increase from an environmental source. Negative values provide a random chance of doubling a temperature increase from an environmental source.

      See Also:
    • ENVIRONMENT_FROST_RESISTANCE

      public static final net.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute> ENVIRONMENT_FROST_RESISTANCE
      The environment frost resistance of an entity. It is used ONLY for environment temperature changes.

      Positive values provides a random chance of "dodging" a temperature decrease from an environmental source. Negative values provide a random chance of doubling a temperature decrease from an environmental source.

      See Also:
  • Method Details

    • baseValueEvent

      public static net.fabricmc.fabric.api.event.Event<ThermooAttributes.SetBaseAttributeValue> baseValueEvent(net.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute> attribute)
      Gets the base value event that corresponds to the attribute given. If the given attribute is not a Thermoo attribute defined in this class, an IllegalArgumentException will be thrown.
      Parameters:
      attribute - The attribute to get the event for
      Returns:
      Returns the event for the attribute
      Throws:
      IllegalArgumentException - if the given attribute is not a thermoo attribute defined by this class