Skip to content

Removing Trades

crazysnailboy edited this page Mar 15, 2017 · 5 revisions

To remove a trade, you need to create an object with a profession and a career, and an offers object which contains an array of one or more recipe objects.

Removing Trades

Clearing Trades

Removing Trades

Each recipe object needs to specify a career level, and needs to contain a buy and a sell object, which each have as a minimum the item traded.

The system will then find a trade which matches the items for that career and career level, and remove it from the registry.

Here is an example of removing the rotten flesh trade from the Cleric:

{ 
	Profession:"minecraft:priest", 
	Career:"cleric",

	Offers:{
		Recipes:[
			{
				action:"remove", CareerLevel:1,
				buy:{
					id:"minecraft:rotten_flesh"
				},
				sell:{
					id:"minecraft:emerald"
				}
			}
		]
	}
}

Clearing Trades

You can also remove all trades from a career, or from a particular career level.

To do this, add an element to the Recipes collection with an action of "clear", and optionally a CareerLevel value.

Here is an example of removing all the level 4 trades from a Cartographer:

{ 
	Profession:"minecraft:librarian", 
	Career:"cartographer",

	Offers:{
		Recipes:[
			{action:"clear", CareerLevel:4}
		]
	}
}

And here is an example of removing all of the trades from a Cartographer:

{ 
	Profession:"minecraft:librarian", 
	Career:"cartographer",

	Offers:{
		Recipes:[
			{action:"clear"}
		]
	}
}
Clone this wiki locally