• 0

    posted a message on Talk to villager with custom NBT item

    Yup, that did the trick. Thanks!



    {
    	"criteria":
    	{
    		"talked to blacksmith":
    		{
    			"trigger": "minecraft:player_interacted_with_entity",
    			"conditions":
    			{
    				"entity":
    				[{
    					"condition": "minecraft:entity_properties",
    					"entity": "this",
    					"predicate": {"nbt": "{Tags:[\"blacksmith\"]}"}
    				}],
    				"item":
    				{
    					"items": ["minecraft:enchanted_book"],
    					"nbt": "{forbiddenknowledge:1b}"
    				}
    			}
    		}
    	}
    }

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Talk to villager with custom NBT item

    I'm testing out a quest system and am stuck on the turn in phase. It currently accepts any enchanted book but I want to limit the interaction to a book with specific NBT attached.

    I read in the documentation that it supports an NBT string but I can't for the life of me get it to accept the JSON. Here's the advancement I'm working on:


    {
    	"criteria":
    	{
    		"talked to blacksmith":
    		{
    			"trigger": "minecraft:player_interacted_with_entity",
    			"conditions":
    			{
    				"entity":
    				[{
    					"condition": "minecraft:entity_properties",
    					"entity": "this",
    					"predicate": {"nbt": "{Tags:[\"blacksmith\"]}"}
    				}],
    				"item":
    				{
    					"items": ["minecraft:enchanted_book"]
     > > > nbt tag goes here
    				}
    			}
    		}
    	}
    }


    Anyone know what this tag is supposed to look like?

    Posted in: Commands, Command Blocks and Functions
  • To post a comment, please .