Open mega12345mega opened 10 months ago
registry_key/minecraft:item
subtype for id
tag contained within tag ending with "Items" suffix.NbtSuggestionManager.get("entity/minecraft:creeper").getAll()
(for items use "item/" prefix and for block entities "block/"). Also use Loader.finished.get()
to check if it finished loading or just check for null from NbtSuggestionManager.get
what I would recommend doing anyway.I've now added this feature to my mod using NbtSuggestionManager.loadFromName
. Thanks for the help! I appreciate not having to maintain a list of all the tag names myself :)
Hi, generally sorry for not implementing dedicated API yet. I haven't had much time in last couple of month, as well as I was working on another projects. I still have plans to add API, but I don't know when it will be. I'm currently working on the version 1.2, which I plan to release next month, but there won't be any major changes to the code structure so it shouldn't break the compatibility with your mod. Although I planned to add an API in the 1.2, now I think it will be rather 1.3. Also, I will reopen this issue, as I think NBTac not having and API is still an issue.
I'm the creator of the mod NBT Editor, and I was wondering if you would be interested in an integration. Multiple people have suggested including an autocomplete feature (Issue 31), but I haven't been sure of a good way to get at list of the possible tags (especially when accounting for different MC versions; I like to include everything in one jar file). I'm hoping you'll be able to answer some of my questions:
NBTEditorScreen
's create and rename features include the same suggestions?NBTEditorAPI
to avoid complications and make code changes in the future easier to handle. Then you would use the API to easily add the suggestions. Unfortunately, I'm going to be going on a trip soon, so I won't be able to make API changes for the next couple weeks. We could always wait obviously.StringInputScreen
andNBTEditorScreen#getKey
(to determine if the string input is for a key) to supply suggestions. TheNBTEditorScreen#path
field shows the currently displayed "path"; for example: the value would bedisplay/Lore
if you were currently looking at the lore list. The format is non-standard, where everything is separated by a forward slash. This allows for opening SNBT (likedisplay/Lore/0/extra
, where the first line of lore is'{...,"extra":{~what is being viewed~}}'
).Thanks!