Race API-26.2-0.6.1
Curse Maven Snippet
What's new
Race API 0.6.1
AttributePower: general modifier key: The attribute modifier is now attached to the fixed key
raceapi:attribute_power, rather than to the power ID. The skill tree replaces power instances (clone ↔ original)—when using the ID as the key, the modifier from the previous clone would “leak” and not be removed.RaceManager: Global Modifier Cleanup: When a race is removed, ALL attribute modifiers from the
raceapinamespace are deleted (by iterating through all registered attributes viaBuiltInRegistries.ATTRIBUTE)—nothing remains from the skill tree’s power clones.ConditionalPower: player-specific state:
lastConditionStateused to be a singleboolean—the power instance was shared among all players on the server, and when one player toggled the condition, it broke the state for others. It is now aMap<UUID, Boolean>.SummonPower: cooldown: A check for
PowerCooldowns.tryUse()has been added before mobs spawn—the configured summon cooldown now actually works (it was previously ignored).GrantItemPower: once per player lifetime: Instead of checking the inventory (which was worked around by moving the item to a chest and reloading the game), a
raceapi_grant_<id>flag is now used inplayer.getPersistentData().Conditions: a broken condition = false: an unknown or unparsed
condition_typeused to returnplayer -> true(the condition was always true)—now it returnsplayer -> false.RaceSavedData: always overworld: the storage is retrieved from
level.getServer().overworld()—the race is no longer lost when changing dimensions (each dimension has its own DataStorage).Reloading datapacks: Added the
raceapi:reapplyreload listener, which runs last and callsreapplyAfterReload()for all online players—after/reload, players receive fresh instances of powers rather than outdated ones captured before the reload. CooldownClient.clear(): This new method resets all cooldowns; it is called fromSelectedRaceClient.reset()—cooldowns no longer “survive” exiting the world or server.clearAllRaceEffects: early exit — if a player does not have a bound race, effects are not removed (previously, vanilla effects were also removed); resetting flight does not affect spectators (
!isSpectator()).UTF-8 JSON parsing:
PowerDataLoader/RaceDataLoaderread files with an explicitStandardCharsets.UTF_8setting (previously, the default JVM encoding was used, which could cause Russian text to display incorrectly);ParseErrors.clear()has been moved to thepreparephase.
This mod has no additional files

