You can now set versions for your custom items! To do this, just set
Code (YAML):
#in myItem.yml
version
:
(number | default
: 1
)
By default, the version of every item is 1, including items that were created before this update.
If you then want to make a big change to the item, and automagically make the old item the new item when the player does something with it, just increment the version (preferably by one), and set "forceUpdate" to "true"
Code (YAML):
#in myItem.yml
version
: 2
forceUpdate
: true
WARNING: The only thing that will be transferred over to the new item will be the old item's enchantments. Other than that, the old item will be completely deleted, and the player will be given a new item in its place instead (so, the user would lose any custom name they gave to the item, etc)... If anyone has any feature requests pertaining to this, let me know!