Hello and welcome back to another tutorial in the last tutorial we created textures and today we’re going to be creating an item group to put all of our items in we call them creative tabs but minecraft calls them item group forge makes it very easy to create item Groups as all you have to do is create a class that extends the item group and we don’t even need to register it whenever we want to put an item in the item group we just reference the item group class so let’s begin let’s right click on our core.init package Go to new package then delete the init and type item group let’s click enter and now you should see it splits up our core package into an init package and an item group package let’s right click on item group and go to new class now let’s type tutorial mod or whatever The name of your item group is and then add item group let’s click finish and as i mentioned before this class has to extend item group so let’s type extends item group and there we go but now it’s going to give us an error so let’s just hover over this And add the constructor that has an integer and a string and there we go now let’s delete this to-do line and now it’s giving us another error so let’s add unimplemented methods this create icon function will basically tell the game which item or block will be displayed As the item groups icon let’s not make it a null instead let’s return a new item stack an item stack holds an item the number of items and any mbt data associated with that item but we can just create it with a singular item so now let’s type item Init dot then the name of our item in my case example item and then we need to get that item so now we’re creating an item stack with example item as our icon finally let’s create an instance of the item group that will reference so at the top let’s type public static final Tutorial mod item group and then let’s type tutorial mod is equal to a new tutorial mod item group and now as we wrote here we need a number and a label so as our number let’s type item group dot groups dot length so basically in minecraft there are Say 10 item groups they are registered under the indices 0 to 9. so we can check the length of the item groups that already exist in this case 10 and register it under that number so we’ll have our creative tab registered under 10. now we need to type a label In my case this is going to be tutorial underscore mod and add a semicolon on the end now let’s save this file and now we are ready to reference this class whenever we want to add something to our item group so in item in it so our example item was already created Under the miscellaneous item group so let’s change that to our item group in here let’s type tutorial mod item group dot tutorial mod and now our item will be added to the item group in our main class we’ve added all our blocks to the miscellaneous item group So once again let’s change that to tutorial mod item group dot tutorial mod and that is pretty much it the only thing left is to name our item group so let’s go to our en underscore us json file that we made where we’ve named our block and our item and at the bottom Let’s type item group dot tutorial underscore mod and let’s name it tutorial mod items and now we are ready to run the game and see our item group let’s click run and wait for it to load and now if we open our creative menu and click To the right we should see our tutorial tab in here which we can open and see all the items we created inside that’s going to do it for this video if you enjoyed it please subscribe so you don’t miss the next one Video Information
This video, titled ‘Minecraft Modding Tutorial 1.16 | 4.0 – Creative Tabs’, was uploaded by Cy4’s Modding on 2021-01-19 14:16:15. It has garnered 5710 views and 227 likes. The duration of the video is 00:04:26 or 266 seconds.
double upload and new edit style. we make creative tab today.
(ɔ◔‿◔)ɔ ♥ ~ expand me
C://Follow_Me/ Subscribe: https://www.youtube.com/channel/UCJIDXtGpf4wv1ybDzdTA_vQ/ Website: https://mcmodding.club/tutorials/
C://Help/ Discord: https://discord.gg/x9Mj63m4QG Or comment on this video!
C://Source_Code/ This Episode: https://github.com/Cy4Shot/ModdingTutorial1.16/tree/main/4.0-CreativeTabs All Episodes: https://github.com/Cy4Shot/ModdingTutorial1.16/