In 1.20.5-pre1, a global "minecraft:tooltip_order" tag has been added to control enchantments ordering in tooltips.
I was interested because I misinterpreted this as a tag added to enchantments themselves and believed that I could write an item modifier like this :
{
"function": "minecraft:set_enchantments",
"enchantments": {
"minecraft:unbreaking": {
"type": "minecraft:constant",
"value": 10,
"minecraft:tooltip_order": 2
},
"minecraft:knockback": {
"type": "minecraft:constant",
"value": 10,
"minecraft:tooltip_order": 1
}
}
}
Where the "minecraft:tooltip_order" tag gives a priority to the enchantment order in the list.
But this is of course not the case, and that's why I suggest to add this feature altogether with the existing global tag. The global tag keeps its primary goal of controlling enchantments order when no specific tooltip order has been specified, and the specific tag would overwrite the global tag instructions in the form of a priority where a higher priority leads in a higher position in the list. Equal priorities for multiple enchantments would lead in the global tag controlling again the order between these specific enchantments.
Of course, the previous code being a misinterpretation, I also suggest the tag to be simply called "tooltip_order" instead of "minecraft:tooltip_order".
Thank you for you reading.
Please sign in to leave a comment.
0 Comments