Let’s add custom items to Minecraft all right we found this is back in Taylor once more and in this tutorial we’re going to be adding custom items to Minecraft now this is actually a fairly straightforward process at least for adding the items after we’ve added the Item we’re also going to add a custom creative mode tab because this has changed in 193. so for this we need to in the tutorial mode package right click new package I’m going to call this the item package instead of there we’re going to make a new Java class called the mod Items class and instead of here all of the magic will happen first of all we are going to need a public static final the third register so written like this one F to ours a net microfort Registries and then we can just hit the Tab Key to autocomplete this it will then import The correct class and that’s going to be fine we then need the angle brackets here and we need to put in an item very important that we put an item net Minecraft world item and then just hit the Tab Key again and it will import it As if this is not imported then the class will appear red and you can just click on it press alt and enter and hit import class once again making sure that we choose the correct one from net Minecraft world item and then everything should be fine we want to call this Items this is going to be equals to the third register so we can see it already suggests this to us when it suggests this to us we can just hit the Tab Key dot gate and once again all of this is basically just done by hitting the Tab Key when it suggests what we want to put in here we want to put in here is Forge Registries again tab to autocomplete dot items armor tutorial mod and then once again we just hit the Tab Key to autocomplete that mod ID and then just End it with a semicolon and there we go now all of the code is of course also available in the description below in the GitHub repository so you can double check that as well and you can copy that over if you don’t want to type everything out yourself we need a public Static void register method with an i event bus or event bus and we want to call inside of this items.register passing in the event bus parameter here and then in the tutorial mode class inside of the tutorial mode Constructor we want to call the register method We’re just going to add this here what items dot register and then passing in then bus right here and then we can proceed to actually add the item now how do we add an item well this is going to be a public static final registry object Right you can see this one once again heading tab to import the class angle brackets of type item and this is going to be the black underscore opal this is equal to items dot register and now they’re important I’m now going to put in the name this is a string and we have To put in the quotation marks now when I put in the quotation marks you can see this bus appear this appears automatically and you don’t have to type this out now the name is going to be black underscore opal and then after the closing quotation mark we’re going to Make parentheses open and close and then this Arrow right this is just Dash and a greater than and then this is a new item and then inside of here we have an new item.properties you can see it already suggest this to us so we can just hit The Tab Key to autocomplete and that is all that we need but this crazy thing is a supplier overall you we don’t need to focus on this too much we just basically need this in order for these things to happen at the correct order if you’re like a complete beginner in Java once Again I want to reiterate that Java knowledge is extremely important for this so you know maybe you can get away with adding like one or two items but after that I just highly recommend going through the Java introduction that I have or through any other you know Java Introduction or any other Java course or anything absolutely no worries but that would be that is just highly highly suggested regardless of this we have now added the item and it would already be inside of the game however number one we’ve actually not added this to any Type of creative mode tab so we wouldn’t even see this in the creative mode Tab and then also it wouldn’t have a texture and it would not have a name let’s first of all add it to a creative mode tab for this we’re going to go into the tutorial Remote class we can see there is already an existing method right here that’s called add creative and this is where we want to add this so we want an if statement we want to check basically the tab so we want to get the tab that is Currently being loaded in and we want to then want to say creative mode tabs Dot and let’s say ingredients if this is the case then we want to add to this end dot accept and then this is just going to be mod items dot black and that will add The black opal to the ingredients Tab and that is all that we need to add this in our existing tab but we’re going to see in just a moment how we can add this to a custom Tab and also how to make a custom app but first of all let’s finish The item because right now like I said it doesn’t have a texture and it doesn’t have a name for this we need to go into the resources folder and first of all create a new directory called assets inside of there we’re going to make a new directory called tutorial mod this Has to be exactly your mod ID very important and then we’re going to make four folders we’re already gonna make the entire folder structure please pay attention is extremely important that this is all done correctly the first one is going to be the block States folder right here in the tutorial mode fold Another folder in the tutorial mode folder is going to be the Lang folder l a n g then we’re going to need another directory called models and then last but not least the last directory is going to be called texture take a note of this and make sure that your assets Folder structure exactly like this otherwise it will not work now we also need or more folders two in the models and two in the textures folder so in the models folder right click new directory called lock and then another one right click new directory item and then the Same goes into extras folder so right click directory called block and then one last time textures new directory item and this is the full follow structure for the assets folder and this is all that we really need let’s first of all start by looking at the Lang Folder here we want to create a new file called en underscore us.json written exactly like this very important that when you make these files that they’re written exactly correctly not with like an up uppercase E or you know instead of a underscore it’s like a dash it has to Be exactly Ian underscore us.json and this will add translation to certain key space but this will add the translation for the English US version of English inside of the game this is the default language that it should start with usually and what we’re going to do is we’re going to translate this particular Item right here the black opal and the way that we do this is we’re going to give it the key the key is item dot tutorial mod or whatever your mod ideas dot black underscore opal and then colon and this is what it then will display Inside of the game as and that’s going to be back so this is the translated name so this key presents itself as follows right item is just because this is an item right a tutorial mode is just our mod ID and black opal is the name given right here this is extremely Important and also to note this name right here can also only include lowercase characters underscore Dash and numbers no uppercase characters and no spaces that’s very important however this name of course can load spaces and uppercase characters because this is the localizing if you want to add another Language then you just have to get the language code so for example German would be d e underscore D e.json and then you could also translate that and that would also work then so that is the enormous Json file we then need an item model file so in the models item folder Right click new file and this is going to be the black underscore opal.json once again the name of the file here has to correspond exactly to this name very important and I will actually type out the contents of this file and then we’ll go through and explain it so we’re going To need curly brackets and then we’re going to have a parent that parent is going to be Minecraft colon item slash generated comma then textures colon curly brackets layer 0 Poland to tutorial mod colon item ash black or opal so the first thing you’re going to say is that Look absolutely insane and crazy but no worries at all we’re going to pick the support so the parent over here basically just determines how this item is going to be displayed item generated from Minecraft basically just means that it’s going to take the 2D texture that we’re going to provide it’s going to Extrude this a little bit in this 3D way that basically Minecraft makes its items look and that is just the default way basically items look there are also other ones but for the time being we’re just going to look at this one and then we’re defining the texture now what’s Very important also here is that everything here is written correctly it’s not item with an uppercase it’s not generated with an uppercase G it’s not parent with an uppercase G it’s not parents right it is parent written exactly like this is textures floral and then here it is layer 0 written like This so it’s not uppercase L it’s loading all of those before so please make sure that this is written correctly and then here we’re defining what texture what are the texture right so we’re looking in the tutorial mod folder so we’re we’re in the assets folder we’re looking for tutorial mode and We’re looking for the textures folder we’re then looking for the item folder and we’re looking for a black underscore opal.png and that’s all that this basically determines so I’m just going to copy over the black opal PNG this is going to be available to you as well and That is pretty much all that there is to it now the black opal has a name and it also has a texture determined by the item model Json file and this is actually all that we need to do to add our item let’s go into the game save the Item is there and then we’ll continue with a second item and a custom creative mode tab when you’re making a new world this might be what is presented to you that’s totally fine you can just hit yes and everything is going to be okay all right so we find ourselves in Minecraft And let’s just see in the ingredients tab at the very bottom there we go we have the black opal so it has been successfully added to the game exactly like we expect to the name is correct the texture is correct so this is absolutely amazing and now let’s add a Second item as well as a custom Creative Mode app right to add a second item we’re gonna go into the mod items class and what we’ll just do is we’ll just duplicate this particular registry object we’re just going to select it press Ctrl D and then it has been Duplicated now of course we need to change the name right here so that’s very important in our case this is going to be the raw underscore black opal and then same changing the name here very important that this name changes because if it is the same then your game will Actually not launch correctly so very important that this is unique now first of all then let’s also add this to the ingredients over here so this is going to be raw black opal beautiful and then we also need all of the Json files so in The E and unscrew us Json file you just duplicate this add a comma over here change the name here and then change the name right here well and then it is going to be translated when it comes to the item model Json file we can just Copy it by dragging it into the same folder while holding Ctrl then changing the name to Raw understand or black opal and then changing this right here to what texture it basically looks at or what texture it basically points to and then just copying over the raw black op And now the second item has been successfully added now how about the Creative Mode app the creative mode tab is a bit more complicated but also not really so in the item package right click new Java class called mod creative mode abs and what we’re going to do Right here is something interesting so we’re going to have a public static creative mode tab called we’re going to call this the tutorial underscore tab right and now we’re going to add something pretty crazy now just bear with me this is going to be pretty Insane so we’re going to do an at above the class as you can see so add symbol mod and see this one right here let’s let’s hit the Tab Key we then want to delete the parentheses I’m going to hit dot event bus subscriber then make new parentheses we’re going to start typing In mod ID you can see we’re just going to once again autocomplete this with app Oreo mod odd ID I’m a bus equals odd dot event bussubscriber DOT bus that mod very important that this is done correctly all of this is of course also available to you in the description Below GitHub repository and then we want to make a public static void register creative mode tab method with a creative mode tab event dot register for event and then there we go this needs to have another annotation and that’s the Subscribe event important so double triple quadruple Check that this is all written correctly and then inside of here how do we actually create a new creative mode tab well what we want to say is we want to say tutorial mode tutorial tab equals event dot register creative mode tab making a new resource location the Resource location is going to be oreomod.mod ID comma Oriole underscore Tab and then after the first proposing in parentheses comma this is going to be we’re going to start typing Builder and you can see it’s going to create a consumer of Builder so we just hit the Tab Key once again and then here we just want to say Builder dot icon so this is going to be the icon that is displayed in the creative mode inventory this takes in a supplier so once again open and close parentheses the arrow this is pointing to a new item stack of mod Items dot black opal.get after the second close actually after the third closing parenthesis that title and this is going to be a component component.translatable and this is going to need a key that key is going to be item group or creative mode tab creative mode tab dot Oriole on app let me Actually reorganize this a little bit there you go and then at the end here just a semicolon so if this is a little bit crazy absolutely no worries overall the only thing we’re doing here is we’re setting the icon for the creative mode tap to our black opal and then we’re Also setting the name of the creative mode tab to a translatable component which is creative mode tab dot tutorial mode tutorial Tab and we just want to copy this and actually translate this in our in underscore us Json file as well and we can then call this the Oriole Oriole tab for example there you go and then this can also be translated into different languages right now this method will be called automatically because of all of this craziness over here the event by subscriber and the Subscribe event so this will all be done automatically and this is basically the Way that we’re going to do it if you want a second one right you can just add another one here and just duplicate this as well sign this and then just change the name and change the translation change the item here then you have a second tab as well time being we’re Totally fine with one Tab and in our tutorial mode class what we can then do is we can also add this to the other tab so what we’re going to do is we’re just going to duplicate this if statement and instead of saying Hey I want this if Statement to look for the ingredients tab we’re going to say mod creative mode tabs that tutorial Tab and then this will add it to this tab as well and there’s no worries at all we can actually add items to mobile tabs at the same time this is for demonstration Purposes I think this is very sensible to do this and that is actually all that we need to do so this one is a little bit crazy because this is actually using some events over here but don’t worry too much about it you know this shouldn’t be too crazy also you always Have the GitHub repository that you can take a look at and make sure that this is all written correctly regardless let’s go into the game and see if it works alright professors back in Minecraft again and let’s just see first of all the ingredients tab we have both The black opal as well as the raw black opal absolutely freaking awesome let’s actually do only once we can see the Beautiful Textures here and then we can also see the tutorial tab absolutely freaking awesome it is already has a proper name so the translation has Worked it has both of our items in it and that is absolutely freaking awesome and there we go that’s how easy it is to add an item and a custom creative mode tab to Minecraft thank you so much for watching and I’ll see you all next time so yeah Video Information
This video, titled ‘Minecraft 1.19.3 – Forge Modding Tutorial: Custom Items | #2’, was uploaded by Modding by Kaupenjoe on 2023-01-25 15:59:47. It has garnered 19607 views and 413 likes. The duration of the video is 00:15:46 or 946 seconds.
In this Minecraft Modding Tutorial for Forge, we are adding a Custom Item to Minecraft 1.19.3 using Forge.
== SUPPORT ME ON PATREON == ▶️ https://www.patreon.com/Kaupenjoe
== COMPATIBILITY == ▶️ Compatible with 1.19.3 and 1.19.4 🛑 NOT COMPATIBLE with 1.20.X
== ASSETS & DOWNLOAD LINKS == GitHub Repo: https://github.com/Tutorials-By-Kaupenjoe/Forge-Tutorial-1.19.3/tree/2-items Assets: https://url.kaupenjoe.net/mkbj08/assets
== 25% OFF FOR GAMING SERVERS == ▶️ https://www.bisecthosting.com/Kaupenjoe
== TAKE A LOOK AT MY COURSES WITH COUPON CODES == ▶️ NEW Forge Modding with Minecraft 1.20.X: https://url.kaupenjoe.net/CourseForge120X ▶️ Learn Forge Modding with Minecraft 1.18: https://url.kaupenjoe.net/CourseForge118 * ▶️ Learn Fabric Modding with Minecraft 1.18: https://url.kaupenjoe.net/CourseFabric118 * ▶️ Complete and Roblox Lua Game Development: https://url.kaupenjoe.net/RobloxCoupon *
== SUPPORT ME ON PATREON == ▶️ https://www.patreon.com/Kaupenjoe
== SOCIALS == Discord: https://discord.com/invite/yqxykanpWf Personal Twitter: https://twitter.com/Kaupenjoe
Instagram: https://url.kaupenjoe.net/tutorials/instagram Facebook: https://url.kaupenjoe.net/tutorials/facebook Twitter: https://url.kaupenjoe.net/tutorials/twitter TikTok: https://url.kaupenjoe.net/tutorials/tiktok Written Tutorials: https://url.kaupenjoe.net/tutorials/blog
== LICENSE == Source Code is distributed under the MIT License. Additional Licenses for other assets can be seen below or in the accompanying CREDITS.txt on download.
== AFFILIATE DISCLAIMER == * Some of the links and other products that appear in the video description are from companies which I will earn an affiliate commission or referral bonus from or are my own products. This means that if you click on one of the product links, I’ll receive a small commission or additional kickback without any additional cost for you. This helps support the channel and allows me to continue to make videos. Thank you for the support!
== HASHTAGS == #Minecraft #MinecraftModding #MinecraftTutorial #Kaupenjoe