How to add a tag to an item in a GUI

Started by RPJOF on

Topic category: Help with Minecraft modding (Java Edition)

Joined Apr 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to add a tag to an item in a GUI

Good morning all,

I created a block which, with energy, adds power to an item (which works with an NBT tag of item 0 -> 1000), everything works fine, except that now I should be able to if possible add an NBT tag to the item located in slot # 1 of my GUI.

I don't know if this is possible?

Thank you very much and good day !

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
maybe use nbt tag block with…
Wed, 05/26/2021 - 19:52

maybe use nbt tag block with entity/player mainhand/itemstack block

Joined Apr 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I misspoke, infact, the…
Thu, 05/27/2021 - 11:29

I misspoke, infact, the player puts a pickaxe in a slot in the GUI and I would like that when he presses a button in the GUI, an NBT tag is added on the pickaxe.

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
oh um maybe if i understand…
Thu, 05/27/2021 - 20:27

oh um

maybe if i understand you right nbt tag edit "entitymainhand/itemstack" in a "if" block checking that its 1 of the pickaxes/custom pickaxes if you have them

if this does not work you could send the workspace and i could try 

Joined Apr 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
No not exactly, 😬, I would…
Thu, 05/27/2021 - 20:54

No not exactly, 😬, I would just need to add an NBT tag to an item that is in a GUI input, if that is possible?