Update to Minecraft 1.21.5
This is the first stable release for Minecraft 1.21.5. It includes a few new features from Thermoo 4.4 and 5.3 as well that are meant to provide greater flexibility and depth.
- Updated to Minecraft 1.21.5
- Removed all deprecated APIs, including the
EnvironmentController
,TemperatureConverter
, and some methods ofConfiguredTemperatureEffect
, andTemperatureEffects
. - Many classes such as
EnvironmentCommand
andTemperatureCommand
classes were made final, and all static only now have a private constructor. This is technically a breaking change, though unlikely to affect anyone. - Updated game tests to use new framework
- Replaced the
canFreeze
andcanOverheat
Kotlin temperature aware function extensions withcanBeCold
andcanBeWarm
to fix a conflict with the methodEntity#canFreeze
. - Environment Heat and Frost Resistance can now accept negative values. A negative environment resistance now provides a random chance of doubling a temperature decrease from an environmental source.
- Added a
priority
field to the environment definition. This is used to sort the order that environment providers are applied to a biome during a lookup. - Implementation detail only: environment providers are now stored as a field of the
Biome
class, this should allow for slightly faster lookup times.
Environment Refinements
This update adds a few new features to the environment API to make it more flexible and offer a bit more depth.
- Environment Heat and Frost Resistance can now accept negative values. A negative environment resistance now provides a random chance of doubling a temperature decrease from an environmental source.
- Added a
priority
field to the environment definition. This is used to sort the order that environment providers are applied to a biome during a lookup. - Implementation detail only: environment providers are now stored as a field of the
Biome
class, this should allow for slightly faster lookup times.
Update to Minecraft 1.21.5
This is a first release for Minecraft 1.21.5. It is initially released as a Beta because Cardinal Components API is not yet stable, however from my testing it does seem to work fine. If you find any issues please feel free to report them to https://github.com/TheDeathlyCow/thermoo/issues.
- Updated to Minecraft 1.21.5
- Removed all deprecated APIs, including the
EnvironmentController
,TemperatureConverter
, and some methods ofConfiguredTemperatureEffect
, andTemperatureEffects
. - Many classes such as
EnvironmentCommand
andTemperatureCommand
classes were made final, and all static only now have a private constructor. This is technically a breaking change, though unlikely to affect anyone. - Updated game tests to use new framework
- Replaced the
canFreeze
andcanOverheat
Kotlin temperature aware function extensions withcanBeCold
andcanBeWarm
to fix a conflict with the methodEntity#canFreeze
.
Update to Minecraft 1.21.5
This is a first release for Minecraft 1.21.5, targeting 1.21.5-rc1
. This version is currently unstable, and should
only be used for early porting.
- Updated to Minecraft 1.21.5
- Removed all deprecated APIs, including the
EnvironmentController
,TemperatureConverter
, and some methods ofConfiguredTemperatureEffect
, andTemperatureEffects
. - Temporarily disabled gametests so that they can be rewritten at a later date
- The
EnvironmentCommand
andTemperatureCommand
classes were made final and now have a private constructor. Other static-only classes like this will receive similar treatment soon.
New Developer Wiki
- The Thermoo Wiki has moved! It has been moved to a new MkDocs-powered wiki available at https://thermoo.thedeathlycow.com/
- Along with the new wiki site, the wiki has been largely restructured and many pages have received updates.
- Contributors can also now contribute to the wiki via pull request on GitHub.
Environment API
This is a large new API with a mix of datapack and mod-based components. I would highly recommend reading the Environment API Overview on the new wiki before going out and trying to implement it in your mods.
- Introduced a new datapack-based Environment API to control environment temperature changes.
- All methods in the Environment Controller have been replaced with a new, more fit for purpose alternative.
- The fundamental change here is that the Environment datapack registry now computes a Temperature for a biome in a some widely recognised temperature unit (Celsius, Fahrenheit, Kelvin, or Rankine), as well as a few other parameters, and then those parameters are converted into temperature point changes by an event listener.
- Added the datapack registry
thermoo/environment
. Format: https://thermoo.thedeathlycow.com/datapacks/environment_definition/ - Added the datapack registry
thermoo/environment_provider
. Format: https://thermoo.thedeathlycow.com/datapacks/environment_provider_definition/ - Added environment resistance attributes,
thermoo:environment_heat_resistance
andthermoo:environment_frost_resistance
. - The environment resistance attributes represent a percentage chance to "dodge" the temperature change calculated from the events in
ServerPlayerEnvironmentTickEvents
each time they are applied.
The full list of method replacements is as follows:
getBaseValueForAttribute()
->ThermooAttributes#baseValueEvent()
getLocalTemperatureChange()
-> The Environment Datapack RegistrygetEnvironmentTemperatureForPlayer()
->ServerPlayerEnvironmentTickEvents.GET_TEMPERATURE_CHANGE
getTemperatureEffectsChange()
->LivingEntityTemperatureTickEvents.GET_ACTIVE_TEMPERATURE_CHANGE
getFloorTemperature()
->LivingEntityTemperatureTickEvents.GET_PASSIVE_TEMPERATURE_CHANGE
getMaxWetTicks()
-> The entity attributethermoo:max_soaking_tick_multiplier
(on 1.21.1, the name isthermoo:generic.max_soaking_tick_multiplier
)getSoakChange()
->LivingEntitySoakingTickEvents.GET_SOAKING_CHANGE
getHeatAtLocation()
->LivingEntityTemperatureTickEvents.GET_PASSIVE_TEMPERATURE_CHANGE
applyAwareHeat()
->LivingEntityTemperatureTickEvents.ALLOW_ACTIVE_TEMPERATURE_CHANGE
getHeatFromBlockState()
-> removedisHeatSource()
-> removedisColdSource()
-> removedisAreaHeated()
-> removed
Item Attribute Modifier Event
- Added an experimental
ModifyItemAttributeModifiersCallback.EVENT
that is very similar to the previous Fabric API event of the same name. - This applies attribute modifiers to an entity when they equip or unequip an item, it does not actually modify the underlying
minecraft:attribute_modifiers
component of an item stack.
Kotlin Bindings
- Added new Kotlin-specific method and field extensions to
TemperatureAware
andSoakable
. - These methods allow Kotlin users to use these interfaces in an intuitive way and without having to add a
thermoo$
prefix to all methods.
- Added
get
methods to theTemperatureAware
class that allow the interface to be obtained fromLivingEntity
andEntity
. Primarily intended for cases where interface injection may not work well. - Added translated for the consumable tags
- Replaced the attribute base value method of the environment controller with dedicated events. The old controller method has been deprecated. See PR #43
- Entity tags and lists are now allowed in the temperature effect
entity_type
field as a#
prefixed tag ID or list of direct entity type IDs. See PR #42 - Fixed the
remove()
temperature effect method not being called/tracked properly per entity. In particular, this fixes an issue where attribute modifier temperature effects would behave weirdly - The constructor for the
ConfiguredTemperatureEffect
has been marked as internal. The previous constructor has been kept to avoid a breaking change, but it has now also been marked as internal. - Deprecated
ConfiguredTemperatureEffect#applyIfPossible()
(replaced with anapply()
method that returns success instead). - Deprecated
ConfiguredTemperatureEffect#entityType()
- use the newentityTypes()
method (plural) - Deprecated
TemperatureEffects#getEffectsForEntity
- this method should not have been part of the API and will be removed - Added
TemperatureEffects#getEffect
that allows for looking up a configured temperature effect by ID - The "resource conditions were not met" log has been moved to debug, which should reduce log spam caused by Thermoo
- Updates Thermoo 4 to run natively on Minecraft 1.21.1 (Minecraft 1.21 support has been removed)
- Deprecated the armor materials API: This API is removed for Thermoo 5+, please consider using Item Components instead.
- Fixed a crash when a mount had more than 60 health and the temperature display exceeded the hearts actually being displayed
- Exposed Fabric API properly in gradle.
- Fixed TheDeathlyCow/frostiful#123: Crash with the mount health temperature bar
- The season events now MUST return the correct season type. If a listener attempts to return the wrong season type, then it will be skipped and an empty will be returned instead. For example, if a
GET_TROPICAL_SEASON
listener attempts to return summer instead of tropical wet or dry, then it will be ignored.
This update brings Thermoo to 1.21.3. This is the first step in updating Frostiful and Scorchful. 1.21.1 will still continue to receive updates and fixes along with 1.21.3 for the foreseeable future, this is just for those who wish to play with newer versions.
Also, the Scorchful update may take a bit longer than Frostiful as it is currently blocked by Satin needing to update. Stay tuned!
Changelog:
- Updates Thermoo to 1.21.3
- Removed Armor Materials API including all tags and events. Unfortunately, the Armor Material registry was removed in 1.21.2, and so this API was completely unable to be updated. As an alternative, I would recommend checking out the Item Components mod as it provides a much more powerful way to modify the base settings of items (including attributes) in a data-driven format.
- Removed the
generic.
prefix from all attribute IDs. For example, the ID for Frost Resistance was previouslythermoo:generic.frost_resistance
, but is now simplythermoo:frost_resistance
. This change was made to reflect similar changes to attribute IDs in the vanilla game. - For old worlds being updated to 1.21.3 for the first time, this prefix change will be datafixed so all items and entities should retain their old attribute values (and you won't get any unknown attribute spam in the console). However, API users (i.e., mods, mod packs, and data packs) will have to adjust their code for this change manually.
- The season events now MUST return the correct season type. If a listener attempts to return the wrong season type, then it will be skipped and an empty will be returned instead. For example, if a
GET_TROPICAL_SEASON
attempts to return summer instead of tropical wet or dry, then it will be ignored.
- Added a
thermoo:attribute_modifier
temperature effect that applies "fixed" attribute modifiers to affected entities. - Added the tropical Wet and Dry Seasons to the Seasons API, along with an event to query these seasons
- Cardinal Components API is no longer embedded with Thermoo - users must now download it separately from Thermoo.