mega12345mega / NBT-Editor

Edit items, blocks, and entities in-game.
MIT License
46 stars 14 forks source link

Add a feature to get the give command #18

Closed SioGabx closed 1 year ago

SioGabx commented 1 year ago

Hello, can you add a command to get the give command of the curent item in hand ? For exemple i have this (simple exemple): image

And i want this : /give @p oak_sign{AttributeModifiers:[{AttributeName:"generic.armor",Amount:5,Name:"generic.armor",UUID:[I;-122817,14381,23514,-28762]}],display:{Name:'[{"text":"Panneau","italic":false}]',Lore:['[{"text":"Hy ! Your mod is awesome","italic":false}]']},Enchantments:[{id:fire_aspect,lvl:5},{id:sharpness,lvl:10}]} 1

Can you add something like this ? Ps: your mod is awsome πŸ‘

mega12345mega commented 1 year ago

I was considering making it so the "Expand" button would also work when no tag was selected, at which point it would display the whole compound/list's nbt. (For example, when inside the AttributeModifiers tag, clicking Expand would be the equivalent of hitting the back arrow, selecting AttributeModifiers, and clicking Expand.)

This would also allow you to access the item's entire root tag at once, which could be copied into a /give command.

As an addition, do you think I should also make a dedicated command for this purpose? Something like /nbt export give, which would copy the full /give command to your clipboard. It could also have variants like:

SioGabx commented 1 year ago

Having both (the "expand" button and the dedicated command) would be perfect for me ! I look forward to your release ! ☺️

mega12345mega commented 1 year ago

I have now released v1.9.0, which includes both the expand upgrade and /nbt export command!