emilyploszaj / trinkets

A data-driven accessory mod and API for Minecraft using Fabric.
https://www.curseforge.com/minecraft/mc-mods/trinkets
MIT License
165 stars 72 forks source link

Update to 1.21 #319

Closed Patbox closed 2 months ago

Patbox commented 3 months ago

Updates trinkets to 1.21 with a set of breaking changes™

Currently a draft as it's unfinished, untested AND crashes due to Cardinal Component dependency not being updated yet

Patbox commented 3 months ago

Got in game and it worked without issues. Ready for review!

Patbox commented 2 months ago

It is handled now by EnchantmentHelperMixin as "repair_with_xp" functionality uses the EnchantmentHelper.chooseEquipmentWith(...) method to get the item. The new mixin actually should cover way more cases than original implementation, as it allows protection-alike enchantments for trinkets to work (and any other datadriven one).

Patbox commented 2 months ago

Only issue I can think of would be change of format for EntityAttributeModifier's nbt (due to name + uuid -> identifier) change, but that should only result on few warns and persistant/cached modifiers being cleared.