As far as I've read, advancements can give rewards, like unlocking recipes, obtaining XP and items...
About the recipes, there is a way to give or take known recipes from a player.
Since I play a lot of RP in Minecraft, I had the idea to make the advancement system as a skill tree that gives recipes according to the profession of the character.
Now, the problem is if the player lose that specific advancement, the recipe still known after all. I could use a command block that checks this condition, but I don't like this.
So, is there a way to achieve that? Thanks for the replies.
Actually, I take it back. You can have an advancement run a command as a reward now. So you could create an invisible advancement to represent losing 'wood craftsman' that would remove the recipes. Then, when you take away the Wood Craftsman advancement, just make sure to also give the 'lost_wood_craftsman' advancement.
Alternatively, if people will always have a profession, you could have gaining one profession also remove the other professions' recipes. It'd be a lot of typing, but you'd only have to do it once, and copy-paste is your friend.
In order to remove the advancement in the first place, you're going to have to run a command. Why not just remove the recipes at the same time?
I could remove individualy, but what if my advancements unlock a large amount of recipes? Imagine I've got an advancement for a "wood craftman profession" that unlocks every recipes containing wood, let's say 50 recipes. Somewhat, the player is no longer a "wood craftman", so I remove this advancement. In order to remove every recipes, I have to run the command for each recipes... which can be annoying...
So, I would like to know if there is a way to automate this, without running command blocks. If there is no way, maybe I will add an suggestion to add an event when a advancement is removed.
I could remove individualy, but what if my advancements unlock a large amount of recipes? Imagine I've got an advancement for a "wood craftman profession" that unlocks every recipes containing wood, let's say 50 recipes. Somewhat, the player is no longer a "wood craftman", so I remove this advancement. In order to remove every recipes, I have to run the command for each recipes... which can be annoying...
So, I would like to know if there is a way to automate this, without running command blocks. If there is no way, maybe I will add an suggestion to add an event when a advancement is removed.
There's no way to do what you want that I know of. But even from a role-playing perspective, why would the character just forget the skills they had learned?
Actually, I take it back. You can have an advancement run a command as a reward now. So you could create an invisible advancement to represent losing 'wood craftsman' that would remove the recipes. Then, when you take away the Wood Craftsman advancement, just make sure to also give the 'lost_wood_craftsman' advancement.
Alternatively, if people will always have a profession, you could have gaining one profession also remove the other professions' recipes. It'd be a lot of typing, but you'd only have to do it once, and copy-paste is your friend.
Have a separate command reward removing each profession's recipes. It's slightly more typing at first, but it will save you a lot of trouble when duplicating them for each profession, and also make it much easier to create new professions later. (As well as adding recipes for new blocks and items in future updates.)
So let's say you have four professions, Woodsman, Stonemason, Blacksmith, and Wizard.
The advancement to make someone a Woodsman would have one reward to grant the Woodsman recipes, one to remove the Stonemason recipes, one to remove the Blacksmith recipes, and one to remove the Wizard recipes.
Then when you make the Stonemason advancement, just copy-paste the Stonemason recipes, only to grant them instead of taking them away. Likewise copy-paste the other three categories to revoke their recipes.
Then if you later decide to add, say, a Redstone Engineer profession, it'll be a breeze. Just remember to edit each profession's file to take away redstone recipes. (As a practical matter, you'll probably have to take away and re-grant everyone's profession to update them properly, but I don't see any easy way around that except by using command blocks.) EDIT: Just thought of a way around this too. Put the different professions on different scoreboard teams. Then it's easy to run a command that will reinstall a given profession for everyone who's online at once.
(EDIT: You could even have separate teams for "Old Woodsmen" and "New Woodsmen" so you don't annoy people by repeatedly reinstalling their profession.)
As far as I've read, advancements can give rewards, like unlocking recipes, obtaining XP and items...
About the recipes, there is a way to give or take known recipes from a player.
Since I play a lot of RP in Minecraft, I had the idea to make the advancement system as a skill tree that gives recipes according to the profession of the character.
Now, the problem is if the player lose that specific advancement, the recipe still known after all. I could use a command block that checks this condition, but I don't like this.
So, is there a way to achieve that? Thanks for the replies.
EDIT :
In order to remove the advancement in the first place, you're going to have to run a command. Why not just remove the recipes at the same time?
Just remember that not having the recipe won't stop people from making the item.
Well Jaxton.. That depends on the gamerule doLimitedCrafting
Ahh yeah, that's right. I forgot about that. My computer doesn't like snapshots so my info comes from here, YouTube, and the wiki.
I could remove individualy, but what if my advancements unlock a large amount of recipes? Imagine I've got an advancement for a "wood craftman profession" that unlocks every recipes containing wood, let's say 50 recipes. Somewhat, the player is no longer a "wood craftman", so I remove this advancement. In order to remove every recipes, I have to run the command for each recipes... which can be annoying...
So, I would like to know if there is a way to automate this, without running command blocks. If there is no way, maybe I will add an suggestion to add an event when a advancement is removed.
There's no way to do what you want that I know of. But even from a role-playing perspective, why would the character just forget the skills they had learned?
Actually, I take it back. You can have an advancement run a command as a reward now. So you could create an invisible advancement to represent losing 'wood craftsman' that would remove the recipes. Then, when you take away the Wood Craftsman advancement, just make sure to also give the 'lost_wood_craftsman' advancement.
Alternatively, if people will always have a profession, you could have gaining one profession also remove the other professions' recipes. It'd be a lot of typing, but you'd only have to do it once, and copy-paste is your friend.
Ow. I see. A reward that runs commands to remove the recipes, and the advancements concerned. That's a nice idea, good job ! Have a +1.
The way I'd do it is this:
Have a separate command reward removing each profession's recipes. It's slightly more typing at first, but it will save you a lot of trouble when duplicating them for each profession, and also make it much easier to create new professions later. (As well as adding recipes for new blocks and items in future updates.)
So let's say you have four professions, Woodsman, Stonemason, Blacksmith, and Wizard.
The advancement to make someone a Woodsman would have one reward to grant the Woodsman recipes, one to remove the Stonemason recipes, one to remove the Blacksmith recipes, and one to remove the Wizard recipes.
Then when you make the Stonemason advancement, just copy-paste the Stonemason recipes, only to grant them instead of taking them away. Likewise copy-paste the other three categories to revoke their recipes.
Then if you later decide to add, say, a Redstone Engineer profession, it'll be a breeze. Just remember to edit each profession's file to take away redstone recipes. (As a practical matter, you'll probably have to take away and re-grant everyone's profession to update them properly, but I don't see any easy way around that except by using command blocks.) EDIT: Just thought of a way around this too. Put the different professions on different scoreboard teams. Then it's easy to run a command that will reinstall a given profession for everyone who's online at once.
(EDIT: You could even have separate teams for "Old Woodsmen" and "New Woodsmen" so you don't annoy people by repeatedly reinstalling their profession.)
I will try something then, when I have time. If I have news, I'll post here. Thanks again for your help !