Class ThermooAttributes
EntityAttributes provided by Thermoo-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.registry.entry.RegistryEntry<net.minecraft.entity.attribute.EntityAttribute> The cold resistance of an entity.static final net.minecraft.registry.entry.RegistryEntry<net.minecraft.entity.attribute.EntityAttribute> The heat resistance of an entity.static final net.minecraft.registry.entry.RegistryEntry<net.minecraft.entity.attribute.EntityAttribute> The maximum temperature of an entity.static final net.minecraft.registry.entry.RegistryEntry<net.minecraft.entity.attribute.EntityAttribute> The minimum temperature of an entity. -
Method Summary
Modifier and TypeMethodDescriptionstatic net.fabricmc.fabric.api.event.Event<ThermooAttributes.SetBaseAttributeValue> baseValueEvent(net.minecraft.registry.entry.RegistryEntry<net.minecraft.entity.attribute.EntityAttribute> attribute) Gets the base value event that corresponds to the attribute given.
-
Field Details
-
MIN_TEMPERATURE
public static final net.minecraft.registry.entry.RegistryEntry<net.minecraft.entity.attribute.EntityAttribute> MIN_TEMPERATUREThe 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).To set its base value, use
EnvironmentController.getBaseValueForAttribute(RegistryEntry, LivingEntity)and check that this attribute is the provided attribute argument.- See Also:
-
MAX_TEMPERATURE
public static final net.minecraft.registry.entry.RegistryEntry<net.minecraft.entity.attribute.EntityAttribute> MAX_TEMPERATUREThe 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).To set its base value, use
EnvironmentController.getBaseValueForAttribute(RegistryEntry, LivingEntity)and check that this attribute is the provided attribute argument.- See Also:
-
FROST_RESISTANCE
public static final net.minecraft.registry.entry.RegistryEntry<net.minecraft.entity.attribute.EntityAttribute> FROST_RESISTANCEThe cold resistance of an entity. 1 point of frost resistance corresponds to a 10% cold reductionTo set its base value, use
EnvironmentController.getBaseValueForAttribute(RegistryEntry, LivingEntity)and check that this attribute is the provided attribute argument.- See Also:
-
HEAT_RESISTANCE
public static final net.minecraft.registry.entry.RegistryEntry<net.minecraft.entity.attribute.EntityAttribute> HEAT_RESISTANCEThe heat resistance of an entity. 1 point of heat resistance corresponds to a 10% heat reductionTo set its base value, use
EnvironmentController.getBaseValueForAttribute(RegistryEntry, LivingEntity)and check that this attribute is the provided attribute argument.- See Also:
-
-
Method Details
-
baseValueEvent
public static net.fabricmc.fabric.api.event.Event<ThermooAttributes.SetBaseAttributeValue> baseValueEvent(net.minecraft.registry.entry.RegistryEntry<net.minecraft.entity.attribute.EntityAttribute> 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, anIllegalArgumentExceptionwill 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
-