More generalized notion of "Indestructible" using Unbreakable NBT
DefinitelyAlec opened this issue ยท 4 comments
I find it disheartening to apply an Eternal Stella to a modded item (i.e. Tinkers Construct) only to find it to continue using durability due to the other mod's custom durability system.
When combining an Eternal Stella with a stack/item, why not add the Unbreakable NBT tag during the onApplied event like how it already checks for if it needs to be repaired?
This makes it so a wider range of items is able to be indestructible regardless of their implementation of durability systems and the intended behavior of the Eternal Stella is further respected.
The alternative to implementing this in Forbidden Arcanus is to make feature requests in every other mod that doesn't use a vanilla durability system but that seems silly if the item itself can be more generalizable with respect to how it interacts with an unknown item that is declared to support the Eternal Stella.
I was playing around with how complicated this would be to implement and was, fortunately, able to stay entirely within the EternalModifier class and add a tag in the onApplied() method for "Unbreakable" in the same way "Repair" is added, just instead outside the scope of the guard clause.
Has anyone actually tested whether the Unbreakable NBT tag actually prevents for example tinkers tools from breaking? If it does I might add this special behaviour as config option but it won't become the default.
I made a short video showing how this works specifically in the All The Mods 7 pack:
Just tried to put this on my tinkers armour, and this work a bit, like broken armour repaired over time, but after armour reach full durability new damage doesnt repair.