
Reset Damage and Cost data on elytra in Unison/Perfect mode
MeeniMc opened this issue ยท 3 comments
Please describe the new feature or change.
The colytraUpgrade NBT should contain the 'merge_mode' tag, for other mods to look into.
Or as an alternative, the 'Damage' field of the colytraUpgrade should contain a special value to mark when it is not useful (i.e., UNISSON/PERFECT mode).
Please describe why you want this feature.
At the moment it is impossible to know if the ColytraUpgrade NBT 'Damage' field is relevant or not by just reading the NBT of the item.
With mods that render the durability (e.g., Durability Viewer gbl/DurabilityViewer#45), rendering should be disabled in UNISSON/PERFECT mode, but enabled in "NORMAL" mode. Author prefers that all information be self contained in the NBT.
This isn't really feasible because the merge mode is a configurable setting, which can change at runtime. The tag stored in the data would become outdated anytime the setting changes and cause inconsistent behavior. While I understand concerns from authors about having a soft dependency on Colytra, I don't think there's a way around it in this specific context. It would require a way to view the configuration files in a mod-agnostic manner, which I don't think is possible right now.
Ok, I understand about the concern switching back and forth.
Could you still reset the 'Damage' and 'Cost' fields to 0 when merging during UNISON or PERFECT mode? That would avoid creating a 'problem' colytra that has a permanent display of a damaged elytra when that doesn't make sense (furthermore, this cannot then be corrected by players on public servers, where Colytra cannot be switched to NORMAL to resplit/repair the colytra-elytra).
I note that Elytra enchants are already nuked in the process of merging in UNISON or PERFECT modes, thus erasing the Damage field is consistent with this behavior.