Attributification NeoForge 2.1.0 for 1.21.1
Curse Maven Snippet
What's new
Upgrade notes
- Update the mod on the server and on every client at the same time. A client with a different version of the mod gets no mappings from the server (its tooltips and HUD show unconverted values) and cannot open the editor; on Forge 1.20.1 it cannot join
- Fabric: minimum Fabric Loader by Minecraft version: 1.20 - 1.20.1 → 0.16.10, 1.20.2 - 1.20.6 → 0.16.0, 1.21 - 1.21.1 → 0.16.5, 1.21.2 - 1.21.3 → 0.16.8, 1.21.4 → 0.16.9, 1.21.5 → 0.16.10, 1.21.6 - 1.21.8 → 0.16.13, 1.21.9 - 1.21.10 → 0.17.0, 1.21.11 → 0.17.3, 26.1 - 26.2 → 0.18.4, 26.3 → 0.19.3
- NeoForge: minimum NeoForge by Minecraft version (older builds and betas do not load the mod): 1.20.4 → 20.4.167, 1.20.6 → 20.6.115, 1.21.1 → 21.1.215, 1.21.3 → 21.3.56, 1.21.4 → 21.4.121, 1.21.5 → 21.5.74, 1.21.8 → 21.8.9, 1.21.10 → 21.10.63, 1.21.11 → 21.11.42, 26.1.2 → 26.1.2.71, 26.2 → 26.2.0.57, 26.3 → 26.3.0.76
- Fzzy Config and Architectury API are no longer needed and can be removed
- Mappings from the 2.0.x config file are no longer loaded: open
/attributification guiin one world and press Convert Old. The old file is then renamed toattributification.json5.converted; to use the same mappings in other worlds, copy that world'sdatapacks/attributification_guifolder into them - After the first start, check the log for skipped mappings: a mapping with an error, a loop or equivalence 0 is now skipped with a warning
New
- Mappings are data pack files:
data/<namespace>/attributification/mappings/<file>.json. Ship them with a modpack, change them per world and apply them with/reload. Wildcards and excludes work on every Minecraft version, 1.20.1 included - In-game editor
/attributification gui(operators, permission level 2): all mapping files in one list, an editor for each mapping and a search over all attributes - The editor applies a save, a delete or a conversion right away, without
/reload; when that is not possible, it says that/reloadis needed - The editor asks before discarding unsaved changes or deleting, checks attribute IDs and numbers before saving, keeps unknown fields and comments in the file, and shows the server's answer to every request. Files up to 1 MB open in the editor; a large file may be too big to save from the game (the editor says so)
- Converter for 2.0.x mappings: the editor finds the mappings in the old config file and writes them into the world's data pack when you ask. An entry with an invalid number is skipped with a warning; equivalence 0 is replaced with 1 where the mapping's mode does not use it; otherwise the converted mapping keeps 0 and is skipped with a warning until you set a non-zero equivalence
- The log level is set in
config/attributification.json(Fabric),config/attributification-common.toml(Forge, NeoForge up to 26.2) orconfig/attributification-local.toml(NeoForge 26.3), and a data pack can override it indata/<namespace>/attributification/config.json(the data pack loaded last wins). The default is now WARNINGS instead of ERRORS - Clients use the server's mappings: the server sends them when a player joins and after every reload, so the HUD, the inventory and tooltips show the same values as the server
- New Minecraft versions: Fabric 1.20 - 1.21.11 and 26.1 - 26.3; NeoForge 1.20.4, 1.20.6, 1.21.3 - 1.21.5, 1.21.8, 1.21.10, 1.21.11, 26.1.2, 26.2 and 26.3 (2.0.x: Fabric and Forge 1.20.1, Fabric and NeoForge 1.21.1). NeoForge has no release build for 1.20.3, 1.20.5, 1.21.2, 1.21.7, 1.21.9, 26.1 and 26.1.1, so the mod does not support NeoForge there
- Built-in mappings also work with the 1.21 mod IDs of Apothic Attributes, Eidolon Repraised and More RPG Library
- Russian translation of the editor and its messages
Changed
- A mapping with equivalence 0 is skipped with a warning; 2.0.x accepted it when
conversionEquivalencewas set - Errors in mapping files are reported with the file and the mapping: a mistyped attribute ID, an unknown field (with a suggestion), an unknown
modeoroperationConversion, a conversion that would divide by zero. Such a mapping is skipped modeandoperationConversionvalues ignore case and_- Mappings for mods that are not installed are not reported one by one; one summary line tells how many mappings are active
- Messages from attribute lookups that run every tick are logged once instead of every time
Fixes: attributes and saves
fullReplacementmode removed the source attribute's item modifiers instead of moving them to the target, so neither attribute changed (#2)- Item modifiers were converted twice (the value was divided by the conversion equivalence two times)
- The target attribute's own modifiers were divided by the conversion equivalence too; now only modifiers that come through the source attribute are converted
- Modifiers added to a source attribute by any method (permanent, transient, replace, by other mods) are converted, not only some of them
- Converted modifiers could stay on the target attribute after the source modifier was removed
- Reading or setting the base value of a mapped source attribute (commands, other mods) now converts between source and target units
- Loading an entity from a save could change its attribute base values
- Rare crashes or wrong values in single player, caused by a lookup cache shared by the server and client threads
- Memory no longer grows with every modifier added to a target attribute
- Tooltips on 1.21+ also convert attribute modifiers that come from enchantments
Fixes: mappings
- Loops between mappings are always found and skipped
- In a chain of mappings (A to B, B to C) A is converted straight to C, with the right fallback targets
- A mapping written explicitly takes priority over one produced by a wildcard
Fixes: compatibility and network
- Players without the mod can join a server that has it (Fabric, Forge and NeoForge); they get neither the editor nor the server's mappings
- The server checks every editor request for operator permission, refuses file names that would leave the data pack folder and Windows reserved names (
con,nul, ...), limits file and data pack size, accepts only valid mapping files and limits how often one player can save