Hello guys and welcome to the third episode of the Minecraft 1.13 modern tutorials in says episode we’re going to be going over how to create our first item so let’s get started I’m going to reiterate this one more time please make sure you have watched the Java tutorial Series as it’s still linked in the description it’s the first thing so please go make sure you watch it and so if that’s out of the way and let’s get started on this video and firstly we’re going to create a static class inside of our main class here called registry Events so public static class and call it registry events and this is going to be have an annotation that’s mod dot of nth bus subscriber and in here bus is equal to mod dot event bus subscriber dot bus dot mod and this is what we going to register our items so firstly We’re going to create the register items function public static void register items and this is going to have parameters our final registry event dot register it’s gonna make all this mess so you can delete everything here this I for dress reentry and change this one to just item Space event and you want input item as a net dot minecraft items item and this is going to be a subscribe event act subscribe events doesn’t have any parameters so basically what this is it’s creating a new class for our registry events and well any functions with a subscribe event we’ve run on Launch off the game at the same time at the setup and client registries functions that are happening up here so inside a rose two items we are going to firstly put a logger logger dot info items that registered and then we’re going to register our first item before We do that we’re going to need to create a new package this package is going to be the lists package dot lists and inside of here we’re going to create a new class called item list and inside of here we’re just turn to declare our Items so the first item is going to be a basic item so public static item and just call it tutorial item everything here has to be lower case the tutorial under Scott item you cannot have an any capitalization in this name and all the game will crash I learned that Matt the Hard way and this is how Forge wants us to name items so now I’ve declared the item we can go back to the main class and we can do item list dots tutorial item and that’s equal to a new item and it’s going to look for some properties these properties are Information about the item so new item dot properties and then the property there’s lots of different properties that I will go over in another tutorial and in the future maybe but the only one we really care about is the dot group and this is the creative tablet is in And if you rename to I some groups in Mon 2013 and they will go over creating your own item group in another tutorial of now you just want to put it in a any of these item groups I’m going to put it in the miscellaneous one any first time I call in the end and they should item registered apart and one thing we need to add the registry name we can do dot set registry name new resource location mod ID comma and then the name of your thing so tutorial underscore item control shift so to import resource Location and that is our item registered however we can make this a bit more clean by creating a function to do all of this new resource location my ID stuff and so we can just call that function whenever we want this so it wouldn’t create a private function down Here private a static resource location location plus the name of the function and have string name as parameters and we’re going to return a new resource location your mod ID and then name and name being the parameter that we input in which will be our name here so now Instead of writing all this out we can just change this to just have and just call the location function open brackets and just input the name and tutorial underscore item and this looks a lot more clean and we can call this function every time so the item on that register But we need to work on the textures and the its actual name in the game and things like that and that’s what we’re going to do it inside our assets create a new package name here call it assets and create a new package inside of assets calling it your mod ID sorry I Forgot to mention to get your packages looking like if I have click on this downwards arrow click on package presentation and you want it higher achill rather than flat which is what you’ll have it as currently some people prefer that but for me I put it like This there’s three things we’re going to need for item something called lang so put dot lang something called models and another one call two textures firstly Lange this is a language file and we’ll translate the names that we as resource location names into the clean English readable names and that will be Shown in the game so we’re going to create a new text document opens from curly brackets and close them as well and then here we are going to declare our item so item dot then your mod ID then and tutorial underscore item close those quotation marks by a colon and Then the name of what the tutorial item will show up as in the game so tutorial item we’re allowed capitalization here and and this is what you show up like in the game and controls as this to save and go to tutorial mod source main resources assets tutorial mods line and Call this DN underscore u.s. dot JSON Jason is a type of file that all minecraft resource files are installed us and then en is English and the u.s. is United States so you can create different language files for lots and lots lots of different things if you want to support different languages but I was going to use the en underscore us so to understand him Jason files a little better we’re going to install a an eclipse plug-in so click go down to here and click Eclipse marketplace from the help window and type in a wild web and there’s this one here Eclipse wild Web developer click install as you can see here an able simple and rich edition of typical web files including jason here so click install click I accept click finish and leave it for a moment and I’ll ask you to restart eclipse it says would you like to restart Eclipse IDE to Apply the changes click restart now go on to lang right click on this click open with and then generic text editor and as you can see it has some formatting and will also show errors in your JSON am writing so to make which should help you while Creating your model files as well as your line files etc anything that uses Jason this will really help with so now we’re going to keep going to models and create a new package and this is going to be models dot item so model to file item go down to reference libraries and Then here this top one inside of net minecraft has all of the Minecraft files and also this fourth one here client data has all the Minecraft assets and we’re going to need the minecraft assets for this so models item find a very generic item such as an apple and we’ve Got a generic thing here give it a copy then go up into your assets molds item create a new untitled text file paste in save it and inside of source main resources assets toriel mod models item and call it tutorial underscore item dot JSON close it and reopen it so you get The formatting then here where it says layer zero put tutorial item put your mod ID tutorial mod : item a slash and then the name of your item so tutorial underscore item and this is the texture location of the this will look for so in textures creates a New package called item and then go into paint.net this is a good poke a free image editor if you have another free mu J’s here and you can use that you can just get this from get paint.net calm I’ll leave a link for it in the description if you want to install this And use it I’ll also leave a link for the minecraft default textures that you can download and use so you can create anything that’s similar to a minecraft item you can use that as a background for your item and save file open and then if you’ve downloaded it’ll be Called default textures and assets minecraft textures items and there’s all of minecraft textures here I’m going to find an in got service by typing in got get the iron ingot all minecraft textures are 16 by 16 pixels so if you complete creating your own one then you Can just create a new 16 by 16 and and control they and deletes to get rid of everything draw all over it and then save it or you can do what I’m going to do we’ve got our iron got texture here we can go down to the colors choose one Of these pixelated ones that they that have some pixels on them and this kind of like an overlay and it will overlay that color onto the average minecraft texture use the pencil tool and go over and highlight over everything and you can see it’s changing the color but keeping the kind of Contrast the same and that’s how I create a lot of my textures but obviously you can draw whatever you want and and save it as a texture minecraft doesn’t care what you do so that could be a texture if you wanted to so now once you’ve got your texture you into a File save as D and well wherever you’ve stored your mod good source main resources assets toriel mod textures item and save it as your item name tutorial underscore item dot PNG it has to be a PNG file nothing else will work you can give paint on That close now click f5 to refresh and you’ll have your taster here now once you create everything the final that means to do is actually register the item I forgot to add the add this in earlier so type event referring to this event up here the register item event Dot get registry dot register all and then you can delete this values thing and comment it’s like a function in the way and put this like this so that we’ve got a list of all items that we want to register to register a second item all You have to do is put a comma here and in save a semicolon cop and then just add a new item to the item list then declare this item add its properties set registry name and go through and add all the resources and everything will be Great but make sure the last item in your list does not have a comma on the end and there we are our items are registered so you’re going to want to go into the your mod folder and run the run client PAP function we created last time Unless of course you’re running in mobs a date version than me in which case the run function might working inside of Eclipse so now we’re in the game create a new world upload into one you already have then go into the creative tab that you set it in to the miscellaneous one For me scroll down to the bottom and your item should be there it should have the correct name if you have done something wrong in your line file this will say item dot tutorial mod tutorial underscore item so as you can clearly see my line files working if they’ve Done something wrong with the textures or the model then there’ll be a black and purple checkered texture here instead in which case you to make sure that your everything is named correctly in your model and textures files but as you can see we have our own item in the Game so if you have enjoyed this video or found it useful please leave a like down below and subscribe for more tutorials as well as some other content coming out in the future thanks for watching mine has been hairy and goodbye Video Information
This video, titled ‘Minecraft Modding Tutorial for MC 1.14/1.14.3 – Basic Items’, was uploaded by Harry Talks on 2019-03-03 15:00:04. It has garnered views and [vid_likes] likes. The duration of the video is or seconds.
In today’s episode, we create our first item. Basic Java Tutorials: http://tiny.cc/JavaTuts Default Textures: …