Bountiful

Bountiful

35M Downloads

[Suggestion] Command to generate NBT strings for items

TheDeviantCrafter opened this issue ยท 5 comments

commented

The NBT format of items in the bounties.json file is fairly difficult to get right. I'd like a command that generates this for me.

Running /bo hand would generate the modid:itemname:metadata name of said item, including the NBT data. The command doesn't need to add anything to the JSON file - that part is easy.

commented

Fair point. I will add that to my list of things to do! For now, I believe it's as easy as replacing all " with a \" inside of the NBT string.

commented

How do I generate the NBT string for an item?

commented

I haven't been modding for quite a few months, so it might be better to ask somewhere else because I'm not sure which mods can do that right now. I know you can type "/ct hand" with CraftTweaker to see the NBT data, and that output should get put into the CraftTweaker log as well. That's all I can tell you, I'd ask more on their Discord or look it up.

commented

I'm actually going to go a different route with this - instead of keeping the NBT in a string in the JSON file, the NBT will be specified as pure JSON. I plan on adding this to v3.0, it's fairly trivial to do.

commented

Implemented for v3.1.0 as of 2bd12e8

Command is /bo hand, and generates a stack entry JSON and copies it to your clipboard. You just have to paste it into the file ๐Ÿ‘ . You can also mouse over the output in the chat for a preview of what it looks like.