0

So i'm trying to to make a datapack, where you can enchant blocks with enchantments on an anvil in survival. I've tried getting player's data, block's data, but i can't find where the anvil GUI nbt is stored.

1 Answer 1

2

This may upset you --- I don't think GUI interactions are open for manipulation by command. /data get entity @s

See that "isFurnaceGuiOpen" nbt tag? It looks like you can at least detect if a player is interacting with a furnace right? But in fact, it doesn't work. execute as @a[nbt={isFurnaceGuiOpen:1b}] run say open_furnace. The same would apply to something like isAnvilGuiOpen:1b.

The truth is, my visual studio datapack add-on doesn't even recognize this nbt tag.

Another thing, you cannot modify the nbt tags of a player.

There might be other approaches to your question. If you want you can explain in detail more about your concept and I will do my best to help.

1
  • Sadly, i guess you can't detect the GUI. I've looked trough all of the player tags, but there was nothing about anvil. I guess i'll use a hopper. Thanks for the help offering, but i already understand datapacks very well. :)
    – QmegaMax
    Jan 28 at 19:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .