How to Add Custom Recipes to Minecraft Datapack Tutorial (1.20.4 and older)
Vložit
- čas přidán 14. 06. 2024
- This isn't needed after 1.20.5, as Component Crafting was added. This generator lets you make custom recipes now:
misode.github.io/recipe/
Tools used in this tutorial (needed if you are on a version before 1.20.5)
Recipe Generator:
crafting.thedestruc7i0n.ca/
Advancement Generator:
misode.github.io/advancement/
Loot Table Generator:
misode.github.io/loot-table/
Download the tutorial datapack:
www.dropbox.com/scl/fi/rd5meo...
Discord Link:
/ discord
Join our Patron server by supporting us on Patreon:
Get exclusive datapack updates and entire packs.
/ wasd_build_team
Learn about all the donation perks:
wasdbuildteam.website/donate/
*My Favorite Minecraft Server Host*
bisecthosting.com/WASD
Use Code "WASD" for 25% off your first month!
Chapters
00:00 - Intro
1:14 - Step 0
2:25 - Step 1
5:24 - Step 1 Bugtest
7:10 - Step 2
9:43 - Step 2 Bugtest
11:32 - Step 3
14:57 - Step 3 Bugtest
16:53 - Step 4
20:22 - Step 4 Bugtest
21:12 - Outro - Hry
If other common issues come up with y'all following this tutorial, I'll put them here!
EDIT, a better method was added.
In 1.20.5+, Component Crafting was added. You can now just use a generator to make custom recipes now:
Your recipe can have all the data you would want the output item to have, though as of now the input items still can't have any data.
misode.github.io/recipe/
It seems like in current snapshot 24w18a. (Which is what i planned to build a datapack for lols on.)
That the datapack you share for download is currently not at all working, At least on my end.
@m-yx3hq correct, it broke in 1.20.5 actually.
Look into Component Crafting though. It is a way better method that replaces the need for this.
@@WASDBuildTeam Thank you so very much !
This indeed made all progress much easier once i followed that.
Hopefully you'll release a new video soon with an updated method ?
PS:
For the sake of fun and learning i am trying my amateur experience, On making a datapack that can make use of the new Vaults to generate or make custom variants.
With a custom loot table, And only make them unlock with a custom (maybe) craftable key.
Anyways cheers !
And thanks for the helpful and certainly great guidance given to the comunity. 💜💜💜
@@m-yx3hq Yeah, I'll definitely make a tutorial on it at some point. Just trying to get my datapacks updated before making any new tutorials.
Honestly after so much research I was so grateful to find your tutorials!
I was curious is it at all possible to force the loot book to be our custom item texture when we go to craft it
Astounding tutorial. I've been wanting to add smaller ingredient-type objects for my custom data pack, like flour for bread and other in-between item types. Or like a set of copper tools. And this absolutely knocks it out of the park, you've earned a loyal subscriber haha. If you ever find a way to get it to.. not show as "knowledge book" in the crafting table once created, that would be.. lovely though to get another small update haha. But thank you SO much for all this effort you put in.
Thanks for the kind words!
your tutorials are actually usefull
21:18 items components babyyyy ; D. awesome tutorial, after watching took less then 5 minutes to implement my first item without issue.
Yeah, this tutorial is gonna be completely invalidated by Component Crafting when 1.20.5 comes out.
very helpful I just watched it because i wanned to make an enchanted golden apple recipe so thanks !!!!
Also Liked the Vid
I cant believe your videos are so useful but no one leaves a like. You don't deserve less than 1k likes. I am making a datapack and you are making me learn so much. You gained yourself a sub... :)
for the loot table it's better to have 1 function were you set all the items inside of a storage and then use the copy nbt function inside the loot table, that way all items are stored in the same place and it's easier to change data in them
That is pretty smart. Maybe a bit beyond the scope of a beginners tutorial but I might do that in my own packs.
Yea I was honestly surprised you even talked about loot tables in a beginner tutorial
Is that so you can see that it is a red emerald? and not a book? is there any way to do that?
@@federicomazzieri7851 well instead of using loot table you can gave a ``give @s ...{...,CustomModelData:x}`` in a function and just call this functions as the player, but for multiple reason it's better to use loot tables
Great tutorial😊😊
Thank you oh so much! IT WORKS!
19:12 you have to do that because you can't use double quotes inside double quotes
As a programmer, I instantly recognized that.
Thanks mate
Does this work with multiple crafting recipes? Would I need to make them craft into different items so that they don't overlap?
Unlimited, yep.
The output item (the knowledge book) doesn't matter as we don't detect the craft based on the output item, but instead off of the recipe itself.
Great tutorial! Out of curiosity, what is the advantage of using a loot table over giving the item directly to the player?
No item pickup sound, and iirc the give command sometimes also has render issues or inventory not displaying the given item.
@@WASDBuildTeamLegit! Thanks!
Hello can you please tell how to make the recipes craft enchanted items if possible, thank you.
That would be part of the data for the item. Just use a generator like MCStacker.net to make an item with data on it.
@@WASDBuildTeam TYSM
if you don't shift click the item out of the crafting table, it retains its knowledge book form, even when placed in the inventory. How do you fix this?
Glad we solved this on the Discord
man , when i used your tool table (red emerald), it appeared on my minecraft on loot command "loot give @s loot mypack:red emerald", i made my loot table , if i write ( loot give @s loot ) my pack not showing and the coustom item , why ?
Could be far too many things to answer in a comment. Definitely join my discord and ask for help there and I'll see if we can find the issue.
is there a way to add the texture pack in to the data pack so people dont have to install the texture pack separately
Nope
But why not just in the crafting recipe to give the knowledge book with the necessary nbt?
That wasn't a possible thing to do when the tutorial was made. 1.20.5 added Component Crafting which allows you to do this!
whenever I put it as a mcfunction, it always shows up as plain text. is there a fix to this?
If you have installed Data Pack Helper Plus, you just need to set the language in the bottom right to be Mcfunction. Click where it says "Plain Text" and you can set the language!
Im up to the last step but even when i follow the step perfecty it doesnt help i did it once but when i tried to add attributes it just doesnt work anymore and i cant to the old one either
That likely means you broke your loot table, and then with things broken you probably have the recipe/advancement already unlocked and need to unlearn them.
you just saved me from a mental breakdown tysm
So can I do this but the function summons a mob instead?
You could put whatever you want in the function, yeah.
is it possible to add right click abilities to swords?
Sorta.
Right-click detection is most easily done by having the base item be a carrot on a stick, which you can detect the click with a scoreboard.
All my right-click swords are that method.
5:16 could we not just edit this file and replace the knowledge book with whatever custom item? (this coming from someone who doesn't do this kind of thing lol i'm just curious)
Unfortunately no, that is why we have to do this roundabout method.
It is really due to the fact that datapacks don't actually add new items to the game.
I relly hope they add nbt to crafting soon
omg yes that would be incredible
we could craft specific items directly with specific new items
if there was a "multiple" like button, i would have liked u forever, i wasted a WHOLE 6 HOURS DAILY FOR A WEEK
uhh when i try to craft it it doesnt show up in the output area
If I change "item" to "id" in "result", does it not output correctly? Since version 1.20.5, "id" is required instead of "item" for correct output. If you have trouble with such a change, you can use the recipe generator for fixed comments. (by translator)
What's wrong with the /give command other than the popping sounds?
Unsure actually.
Luckily as of 1.20.5 there is a much better custom recipe method
@@WASDBuildTeam What is it?
@@estoboi6811 Component Crafting!
Is there no way to make the crafting output look correct, or is there one but it’s an advanced topic?
Nope, this being a workaround rather than a good method means there are unsolvable issues unfortunately. Mojang would need to add NBT crafting for us to have a good method.
@@WASDBuildTeamI was afraid of that. I can imagine it being possible with *smithing table* recipes because they can work with NBT in some ways that other types of recipes cannot, but even then it would require weird contortions.
Is there a known way to modify this to work with autocrafters (and if so did it change today because of the snapshot)? You canʼt use the recipe, you could still grant an advancement but you wouldnʼt know what recipe was used, and I canʼt think of any more clever workarounds but Iʼm new to programming datapacks.
@danielrhouck I haven't looked into auto crafters.
Today's snapshot changes this a bit, but doesn't make it any better, just different as of right now. My assumption is a big change like this lays the groundwork for other new features though.
@@WASDBuildTeam Seems you were right! If only my pack weren’t stuck targeting 1.20.1 for now
my "loot_tables" file is bugged, the game sees it as a shared namespace and refuses to load anything from it plz help
Hmm, definitely join my discord and ask for help there. I'm not 100% sure what the issue is so I'll need more info
@@WASDBuildTeam I managed to fix it! turns out it was a skill issue on my part I had an invalid 1 in the loot tables file, also my data pack extension was wildly out of date and only just now decided to show its age.
Nice
You need to escape quotations with \" because it's the third nesting of quotes - you are already inside " and '
Oh, very interesting. I have no coding background so I wouldn't know, but good to know!
Just so people know for future notice; This method will likely break in 1.21 due to auto crafting and a new one will either have to be officially supported or a different workaround, such as unobtainable items or floor crafting, used.
So far this method still works in the snapshots with the Crafter enabled, so it doesn't seem like that will be the case.
Multiple utility packs have been made for custom crafting with the new crafter block as well! :)
@@Cryoa I'll need to look into that. Unsure how they would have done that
Hey... Very Good Tutorial... i Made a plushie and i wanted to ask if there is a possibility that when you put the custom item in an item frame the name is not displayed
I don't believe you can avoid that
@@WASDBuildTeam Hmm okay... Thanks for the answer
how good is mcreator to use for datapacks?
I've never tried it but I would assume it isn't too terrible.
is there a way to make the recipe hidden?
This tutorial specifically can't make the recipe... not hidden.
Can I combine two datapacks?
Yes, you could combine any amount
Can you make custom recipes with custom items? And if you can, how?
The ingredient cannot be custom, no. There isn't any workaround either besides coding your own crafting table, (a completely different task of course)
Is there a way to code a new crafting table within a datapack?
@mr_ghostboy3973 yes, i haven't made a tutorial on it because the method isn't super easy, but basically you use my custom block tutorial, but make the base block a dropper.
Then using an NBT check you see if the contents of it match the recipe
@@WASDBuildTeam okay, thank you very much, I will take a look if I can figure it out
i watch your tutorials but for me it doesn't work got any suggestions?
Definitely making a mistake somewhere. Feel free to join my discord and ask for help there and I can help spot the issue.
you are the defenition of a tutorial gigachad its such a good tutorial even i a 13 year old blud understood it
can you make a new vid foe 1.21
At some point, yes.
It just came out so I have a lot to do
Don't Download First Install Custom Crafting Items @#Plugin