- Open an anvil
- Trigger a PrepareAnvilEvent by renaming an item
- Take a look at the output of AnvilInventory#getRepairCost()
- The correct output is provided by AnvilView#getRepairCost()
Outcome - shown in the attached video:
AnvilInventory#getRepairCost() is always 0.
AnvilView#getRepairCost() is not always 0.
Yes, AnvilInventory#getRepairCost() is deprecated since 1.21 and marked for removal in the future. However the replacement method in AnvilView is still marked as experimental. In any case, it can't be deprecated and made unusable in the same version
code in TestPlugin