Title pretty much explains it but I would really appreciate if someone could help me figure this out, I'm very new to this whole datapack thing and I want to make my own versions of some crafting recipes that replace the old ones. For example I want to make glistering melons recipe 1 gold nugget and 1 melon which is easy but I also want to remove the original being 8 gold nuggets and 1 melon. Thank you if you can help
If you want to replace the original recipe, then you have to use the "minecraft" namespace in your datapack and put your recipe in the exact same relative location as the original vanilla recipe.
On a closely related topic, how do you disable a vanilla recipe without replacing it? Like, if I want to simply remove the ability to craft wooden swords, how would I do it?
Well... There are two options for you. One is quite ugly, the other one even more ugly.
The first option is to set the doLimitedCrafting gamerule to true. This game rule causes players to only be able to use recipes that are unlocked in the recipe book. You can then unlock all the crafting recipes, except the ones that you want to disable. Players are now only able to use the recipes that you specifically unlocked for them.
The second option is to copy the entire vanilla datapack into your own datapack and then to remove the recipes that you want to disable from your datapack. Then in the game, you enable your own datapack and then disable the vanilla datapack. basically you replace the entire vanilla datapack with your own, but then with slight modifications.
I can't check right now to make sure, but I think it's actually possible to replace a recipe's JSON with just an empty object or something and it'll remove the existing recipe.
Rollback Post to RevisionRollBack
AKA Arctenik on some websites (or Zatnik, but I'm not the only Zatnik out there)
I can't check right now to make sure, but I think it's actually possible to replace a recipe's JSON with just an empty object or something and it'll remove the existing recipe.
It does seem to work, yeah. The reason why it works is actually just that it causes an error when trying to read the recipe, so you can actually just leave the file completely blank and get the same effect.
Rollback Post to RevisionRollBack
AKA Arctenik on some websites (or Zatnik, but I'm not the only Zatnik out there)
To replace or remove a vanilla crafting recipe, you just have to cover over it.
In any namespace you can create a recipe that is crafted the same as the one you want to remove. Because your new datapack is loaded after the vanilla datpack your new recipe will replace it. To remove the vanilla recipe just make your recipe make air (or probably anything that does not exist should work).
I wanted to remove the recipe for basic firework rockets (ones without a star). I added this:
Sometimes you have to cover over a recipe explicitly in the "minecraft" namespace.
I don't know why, but covering over some recipe otherwise just does not work. For example the "chiseled_sandstone.json".
There is an even easier and more reliable method of disabling a recipe.
Just copy the recipe json and put it in the "minecraft" namespace of your data pack and delete its content.
If you do that, the original recipe isn't loaded anymore. You can also change the content and the new recipe can even be completely unrelated to the original.
Title pretty much explains it but I would really appreciate if someone could help me figure this out, I'm very new to this whole datapack thing and I want to make my own versions of some crafting recipes that replace the old ones. For example I want to make glistering melons recipe 1 gold nugget and 1 melon which is easy but I also want to remove the original being 8 gold nuggets and 1 melon. Thank you if you can help
If you want to replace the original recipe, then you have to use the "minecraft" namespace in your datapack and put your recipe in the exact same relative location as the original vanilla recipe.
I refer you to the minecraft wiki for more details: https://minecraft.gamepedia.com/Data_pack
On a closely related topic, how do you disable a vanilla recipe without replacing it? Like, if I want to simply remove the ability to craft wooden swords, how would I do it?
Well... There are two options for you. One is quite ugly, the other one even more ugly.
The first option is to set the doLimitedCrafting gamerule to true. This game rule causes players to only be able to use recipes that are unlocked in the recipe book. You can then unlock all the crafting recipes, except the ones that you want to disable. Players are now only able to use the recipes that you specifically unlocked for them.
The second option is to copy the entire vanilla datapack into your own datapack and then to remove the recipes that you want to disable from your datapack. Then in the game, you enable your own datapack and then disable the vanilla datapack. basically you replace the entire vanilla datapack with your own, but then with slight modifications.
As I said: Veeeery ugly solutions.
Sounds like it would be easier just to change the crafting recipe to 9 diamond blocks.
What happens if you have the crafting recipe in the minecraft namespace yield air? You can't actually obtain an air block, can you?
I can't check right now to make sure, but I think it's actually possible to replace a recipe's JSON with just an empty object or something and it'll remove the existing recipe.
AKA Arctenik on some websites (or Zatnik, but I'm not the only Zatnik out there)
My texture pack on Planet Minecraft
Please do let us know!
It does seem to work, yeah. The reason why it works is actually just that it causes an error when trying to read the recipe, so you can actually just leave the file completely blank and get the same effect.
AKA Arctenik on some websites (or Zatnik, but I'm not the only Zatnik out there)
My texture pack on Planet Minecraft
To replace or remove a vanilla crafting recipe, you just have to cover over it.
In any namespace you can create a recipe that is crafted the same as the one you want to remove. Because your new datapack is loaded after the vanilla datpack your new recipe will replace it. To remove the vanilla recipe just make your recipe make air (or probably anything that does not exist should work).
I wanted to remove the recipe for basic firework rockets (ones without a star). I added this:
{
"type": "minecraft:crafting_shapeless",
"ingredients": [
{ "item": "minecraft:paper" },
{ "item": "minecraft:gunpowder" }
],
"result": {
"item":"minecraft:air"
}
}
Sometimes you have to cover over a recipe explicitly in the "minecraft" namespace.
I don't know why, but covering over some recipe otherwise just does not work. For example the "chiseled_sandstone.json".
{
"type": "minecraft:crafting_shaped",
"pattern": [
"#",
"#"
],
"key": {
"#": {
"item": "minecraft:sandstone_slab"
}
},
"result": {
"item": "minecraft:air"
}
}
is just a copy of the original with "air" instead of "chiseled_sandstone":
{
"type": "minecraft:crafting_shaped",
"pattern": [
"#",
"#"
],
"key": {
"#": {
"item": "minecraft:sandstone_slab"
}
},
"result": {
"item": "minecraft:chiseled_sandstone"
}
}
,but It will not work.
If you create a new "chiseled_sandstone.json" in the "minecraft" namespace, it will properly cover over the old recipe
There is an even easier and more reliable method of disabling a recipe.
Just copy the recipe json and put it in the "minecraft" namespace of your data pack and delete its content.
If you do that, the original recipe isn't loaded anymore. You can also change the content and the new recipe can even be completely unrelated to the original.