mt1006 / mc-nbtac-mod

Minecraft mod adding suggestions for NBT tags in commands
https://modrinth.com/mod/nbt-autocomplete
GNU Lesser General Public License v3.0
23 stars 1 forks source link

[Suggestion/Feature Request] Add the ability to change how suggestions are sorted #22

Closed SirBob27 closed 3 weeks ago

SirBob27 commented 4 weeks ago

[Suggestion/Feature Request] Add the ability to change how suggestions are sorted

Disclaimer: I apologize if this feature already exists, as I am not sure how the "Save Suggestions" feature works.

Normally, NBT Autocomplete sorts NBT suggestions alphabetically. However, I believe it would be beneficial to have some flexibility when it comes to how these tags are sorted. This would be useful when using this mod in combination with WorldEdit, which adds many commands starting with //. NBT Autocomplete places these commands before normal commands like /advancement. I personally dislike that as it takes away from my ability to easily view the other, more important commands from vanilla minecraft. The ability to sort these tags differently would thus be very helpful for me.

mt1006 commented 3 weeks ago

From what I understand you meant that WorldEdit places its commands before others, as they're sorted in such a way even without NBTac. I think it's more of a WorldEdit issue and I don't really want to add features (like custom command sorting) that aren't really related to NBT tags to this mod.

Generally, I had plans to add custom NBT suggestion sorting and I still consider it, but the main use would be probably sorting numbers in proper order, not alphabetically like it works now. I think although that becomes less and less an issue, as mojang is slowly removing last occurrences of numeric tags in NBT tags (iirc they switched from numeric to string tags for effect ids in 1.20.2 or 1.20.3/4). Other use would be to sort tags by its relevancy for the entity, e.g. creeper specific tags would show before common entity tags, but it would bring confusion when trying to find tag by the first letter.

As for "Save Suggestions" setting it's debug option and it basically saves all found tags to nbt_ac_output.txt file in .minecraft.

For now I will close this issue and maybe in the future add some form of custom tag sorting. Write If I misunderstood something (especially regarding WorldEdit).

SirBob27 commented 3 weeks ago

No problem, you understood perfectly. I was actually planning to eventually make a fork of WorldEdit with less commands anyways, so this resolution is fine with me.