Hey guys welcome back to the timber forge today I’m gonna be showing you how to create your very own custom item crafting recipes that use the normal minecraft crafting table now normally when you want to create a crafting recipe for your custom item you would have to use some sort of workarounds Such as a floor crafting method where you chuck everything onto the ground or maybe you would use a custom dispenser or a custom dropper as a custom crafting table to make your items in so you could actually detect the contents but in this video I’ll show you how to make your Crafting recipe by using an actual default crafting table by using advancements and custom recipes inside of your data pack so what I created is a custom crafting recipe for the Mandalorian pistol that I created in my last video so as you can see when you combine these it creates a knowledge Book but when you actually grab it it gives you the Mandalorian pistol and as you can see this is an actual custom item with NBT that I was just able to craft in the normal minecraft crafting table and I will also release a template pack which you could use if you don’t Want to code it yourself where you can basically just change up the items and duplicate some stuff in order to get whatever your item is so I’ll have that in the description for the download ok so before I actually show how to actually create your own crafting recipes I’m gonna explain how it Actually works so if you just want to skip right to how to do it yourself then just skip to whatever time stamp is gonna be right over here but if you want to stay to see how it works then I’ll explain that right now so right now I’m Inside of my data pack so this is my data packs folder and then this is crafting demo which is the template and so if you go into here you’ll see that there’s recipe advancements and functions so the first thing is a recipes this is the recipe that is Actually added into the game which is in the template is just three things on top of each other a shaped crafting recipe just a stone pressure plate on top of TNT on top of clay and the result gives you a knowledge book now for some reason When you have the result of the crafting recipe be a knowledge book it basically rewards you with unlocking it because that’s what a knowledge book does it unlocks our recipe and apparently when you put it as the result of a crafting recipe it actually unlocks it basically and what I Mean by unlock is that little book on the left side of your screen inside of Minecraft I use to open up all the recipes that’s what I mean by unlock so after it unlocks there is an advancement which actually detects that you unlocked it so inside of advancements This is advancement here which I have it called pistol unlock just because that’s what I was using for my Mandalorian thing but this is just detecting so trigger is if the recipe unlocked for the custom item then it will run the reward and so basically what happens is You craft the item you get the knowledge book you unlock the recipe this advancement detects that you unlock the recipe and as a reward for unlocking the recipe the advancement runs this function and now if you go over to the function you’ll see that the function has four commands here this one takes The recipe away so that when you craft it again you’ll be able to unlock it again and then you’ll have the advancement get revoked so that when you craft it and you unlock the recipe you could actually unlock the advancement again so you could run this whole Command again then you have your actual give command which you’re supposed to replace with whatever item you have and then this just clears the knowledge book from your inventory so when you grab it you don’t just fill up your inventory with a bunch of useless books so that’s all for how it works So now let’s get into how you can actually create your own from scratch okay so of course to get started you want to actually start on the data pack itself so as you can see I’m inside of the data packs folder of my saves folder And if you don’t know how to get here make sure you watch the how to create your own data pack video but this crafting demo is what’s going to be the template inside of the description of the video if you want to just download that for yourself and check out how it Works now let’s get started with making our own so go to my how to create your own data pack video and download the template if you want to use that and then it should download so after downloads just drag it into your worlds folder and this should work on both Mac And Windows so it doesn’t really matter which one you do and then drag the data pack template into there and name it like crafting in demo 2 okay so now we have this in here let’s just get some stuff in order so data and then change the namespace to whatever so I’m just Going to call it crafting and then minecraft tags functions tick JSON crafting save that we don’t actually need the loop but if you want your data packed actually do anything other than just the custom crafting recipes you gonna have to change that ok now go back to the namespace crafting and then now Normally you just have functions here but we don’t just want functions so now what we want to do is create a folder called recipes oh if I could spell recipes so now that we have the folder called recipes we have to actually make the recipe that’s going to go in here so What you want to do is create the JSON file with whatever text thing you want to do I think on Windows you can just a new file a new text file but I’m just gonna go with sublime text new file and let’s save this or or file save whatever You want to do I just did command s and save it into your crafting recipes and call it whatever your item name is I’m just going to call it item 1 Jason and save it and now let’s actually generate the text that’s going to be inside of This folder so now what we want to do is just go to your browser and look up knowledge book crafting generator and it should be one of the first ones it should just be called minecraft tools and then it should say knowledge book of minecraft tools so once you go there Click show or edit the command and then now you’ll see that there’s a thing to create a knowledge book so just delete these and then now create your custom crafting recipe so I’m just going to create a really simple random crafting recipe so I’m just going to put like A diamond on a stick or something I don’t know let’s see so not all the items show up in here so you could just pick whatever items you want and it’s really easy to change it later on so I’m just gonna go on a dispenser on top of a Skeleton head I don’t know with a hay-bale on both sides why not and you can change it later on really easily I’ll show you how to do that so now all you have to do is click generate your crafting and hit this little indent thing so you could actually read it and Then copy/paste this now you have to be very careful here so what you wanted to do is make sure that you delete this line that says tag it doesn’t I mean it doesn’t really do anything but it it kind of messes it up a little bit Depending on it it’s kind of weird just just delete it so it doesn’t cause you any problems and now here you could see how it actually works so the way that it works is this is basically the crafting recipe so I have a shaped crafting recipe and it basically puts spaces Where that doesn’t need to be items if it’s a shaped crafting recipe and then you just put whatever items here so X oxo it’s basically just a key so basically hashtag dispenser and then 0 is just the skull or that’s an O or something and then that’s the X’s on the Side just mean the hey blocks so you could just change this to whatever you want so dispenser I could go to minecraft diamond and then skull I could change to let’s see what I want I’ll do obsidian so that’s gonna be obsidian with a diamond on top and hey blocks on The side so I’ll save that and then make sure it says knowledge book and utility did the tagline so save it and close that you don’t need that anymore so now what you should have is a crafting recipe inside of your recipes folder so now the next thing that we need to add Is the advancement so what you want to do is create a new folder which is called advancements so you should have functions recipes and advancements so now what you want to do is go to your browser or go to the link in the description and just look up advancement Generator and go to the one that says advancement the destruction dossier or whatever and so now once you’re here so it’ll probably look like this when you get here just click Add child and then click on the child one because this is the root one and you only need this if You’re actually creating a full advancement thing but we’re not actually creating real advancements it’s just a crafting thing to unlock it so what you want to do is go to display and click utility it’ll disable the display so now what you want to do is go to criteria And then click the plus sign and then go down to the one that says recipe unlocked right here now you have to name the criteria it doesn’t matter what you put here I’m just going to put unlocked or something and then now you have your Actual recipe what you have to add so go back to here and check what it is so inside of recipes what is the path this is just sitting inside of the recipes folder so I’m just gonna call it item one and you don’t have to add Jason So it’s crafting : item 1 crafting head um one that’s all you need to do and then for requirements you can leave that blank and then for rewards that’s where you actually want to run the function so now what you want to do is go to function and then add whatever function You want to do for your give command so inside of functions we’re gonna add another file here and we’re just gonna call it give item one or something like that it doesn’t really matter what you call it so I’m gonna call it crafting calling give item one and I give Underscore item one and now that’s all you should need so click view Jason and now you should see this you’ll see criteria unlocked and then make sure it says trigger minecraft recipe unlocked and then make sure it says recipe and then the file to the file path and to Your crafting recipe so crafting : item one and it should have the file path to your give item so crafting : give item one now just copy this and go over to your advance it’s folder and create a text file inside of there paste this in and then do file save as And then I’ll save it as item one advancement and then I’ll put it instead of in recipes you want to put it into your advancements folder of course make sure that you actually put dot JSON to the end of it or also won’t actually work and now what you should see is that When you go into the game and you reload it whoops that’s the that’s that the loop function test so that that makes sure that the data packs actually working so just reload again and I’m gonna disable the other data packs so now if we go here let’s see what what did I do I made it with a diamond obsidian and always a hay bales so now you should see I get an advancement when I make the recipe so here and then there we go see I unlocked the recipes and it doesn’t actually notify you of unlocking the advancement but it did run so what we Want to do is go and back into our functions whatever we put in as our function file we have to actually add that function into here so let’s go to sublime text or whatever using new file and let’s just call it give item mundo MC function and save it into the Functions folder and now there’s a few lines of code that we have to add so the first one we have to add is the one that revokes the actual recipe so what we want to write down is a recipe take s and then whatever the item recipe file Is so the file to our recipe is crafting cuz that’s the namespace and then the recipe is item one so just crafting : item one and now just go back into here crafting item one and then now we also have to take away the advancement this just ensures that the player could Actually do it multiple times if you only want the player to be able to craft it once then you don’t need to add this but you probably want them to be able to copy it more than once so do advancement revoke s only and then The path to item one so just put the path here so write down crafting : and then I believe I call the item 1 advancement and then clear the knowledge book so clear is not minecraft knowledge book that’s just so they don’t have much of books in their inventory for no Reason and then do the give command so give pass minecraft I’ll just do stone for now so now what we have to do since we just ran the test and we didn’t revoke it we have to make sure we run the function so I’m just gonna go slash but you only should have To do this once if you were testing it in between so function what was it was craft crafting give item 1 now if I test the recipe as you can see every time you click this I get the stone and if you shift-click it just puts all of the Books into your inventory that you can and then gives you all of the items so that’s crafting recipe completely done now you could just change this give command to whatever you want and if you want to add more items what you could do is all you have to do is duplicate this Duplicate the function and duplicate the recipe so that’s basically it for how to create your own custom item so I hope you guys are able to use this in your own creations just create your own custom crafting recipes but I’ll see you guys next time Video Information
This video, titled ‘Minecraft Custom Crafting Recipes || Craft Custom Items!’, was uploaded by Timber Forge on 2020-02-02 17:39:27. It has garnered 152839 views and 3395 likes. The duration of the video is 00:15:23 or 923 seconds.
Learn how to use a data pack to easily add your own custom crafting recipes into the default crafting bench for any item, including any CUSTOM ITEM with special nbt data.
Check out my new website! https://tinyurl.com/timberforge
CUSTOM CRAFTING TEMPLATE: https://drive.google.com/uc?export=download&id=1I3gMiyQjinFChwCdPBwf-wG5u0s5UB0P
Knowledge Book Recipe Generator https://minecraft.tools/en/command-9135-knowledge-book
Advancement Generator: https://advancements.thedestruc7i0n.ca/
Join our discord for help and inspiration! discord.gg/bwBsSbr
#datapacks #minecraftmods #minecraftdatapacks