Yeah so to creating our first item to start off we’re going to create ourselves an enum and put it into a package pump list and we’re going to name the item list we’re gonna put a semicolon to end it then we’re gonna create constructor it takes a parameter Of item import that item from minecraft items to item and create variables for item in properties and import properties from my craft guide I’ve got properties Set dista idem equals to item and properties equal to a new properties Then we’re going to create another constructor with properties as the parameter and do the same for items in the same for problems then we’re going to make a jitter or getting the item egg-eater for getting the properties A jitter for cutting the item display name and this will return item get name get straight then we’ll make a getter for getting the resource location and this will return item dot get registry name and you’ll have to employ a resource location and then we’ll get the string version of the resource name Alright now we’ll create a new class called item base and this will extend item import that and then we’ll have to create a new constructor with a string as the parameter and we can call that name and we’ll create a variable that stay protected static properties and We’ll call it properties and we’ll set this equal to a new properties and then you dot get I to I get group and we’ll set that to no for now and we’ll put the properties in the super and we’ll set the registry name to know for now and Now we’ll go into the references and create a new method called location it’s going to be a public static resource location and it’s going to take a string as its parameter and we’ll return a new resource location with the mod ID comma the name will import resource location And save now we’ll create the item group or the creative tab and we’ll call a tutorial item group and this will be equal to new tutorial item group and we’ll create a new class and we’ll create the new constructor and this will take the resource name which we’ll call tutorial item group for The icon for now we’ll leave it as no And an item base we’ll create a few kiner’s to get the item and this will return the data as an item and to get the stack which will return the dista item and default instance import item stack And now we can create our first item will call it tutorial engine and I’ll have a parameter of the item base in the name will be the resource name we’ll call it tutorial Indian all lowercase And in our main under registry events we’ll create a new class public static boy register items and it’ll have a final registry event dot register delete all of the predetermined stuff and it’s going to have a parameter of item and it will name it event make sure to put the Subscribe event at the top and we’ll do a for each loop looping through all the values of item list That will do event not get registry register list get item will rename new list to value Now we’re going to get the default minecraft data by going to the minecraft versions and opening up the doc jar of the version that you’re using going into assets and there they are I’ll leave a zip file to all of the assets that I Used in this video so if you go to their assets and then models then item and we’ll be looking for something simple and similar so in iron ingots to probably be the closest open it up and we’ll copy everything in there now we’re going to create some Packages for that so under source main resources create a package and we’ll call it assets dot the mod ID so tutorial underscore Mon and we’ll do dot lame click the language file dot textures item with the item texture and then bottles item or the model and here I’m just putting the packet Presentation into high arts / hierarchical view And we’ll create a new file under Len called en underscore us JSON and I just had that open up with BS code and we’ll copy the resource name that we gave for the item base and we’ll put opening brackets quotes colon and space quotes And we’ll do item dot our mod ID dot the resource name and we’ll call it tutorial English now and your models item will create a new file and we’ll call it the resource name dot JSON the tutorial underscored ingots that JSON then here we’ll do our mod ID : item /a resource Name so tutorial mod : item forward slash tutorial hinges and here I’m just opening up my photoshop files that I have specifically for use again I’ll leave these assets in a zip file in the description if you don’t have Photoshop that’s alright you can use whatever program you’d like I’m Just using Photoshop mutants so here I’m just changing the color of the gift that I have here I’m going to make it a nice red and we’ll save it as a PNG and we’ll put it into the textures items so there I just right click on the folder and set It to open in system Explorer and that I saved it as tutorial underscore ingot PNG with that much that is saved you can set the item stack da ba icon in your item group and set it to items list dot tutorial and get get under dot get default And then the item Bank will set the item group as the group then you crop in stock and we’ll set the name for the item group by doing item group in capital G dot new resource name so tutorial underscore item group and we’ll call that tutorial mod in the Video I made a mistake and I put the mod ID in between you do not want to do that And now we should be able to run by going to the Gradle tasks and under FG runs click run client and I’ll just fast-forward through this because it can take quite a while and we’ll just create a new world with cheats on and we’ll put ourselves into creative mode and go over And as you can see our item was successfully added and our item group was except the name is wrong because as I said I made a slight typo when typing in the name this year I’m fixing but there you have it ladies and gentlemen You have now an item in the game it is now textured and in the next episode we’ll work on creating a block with the item thank you for watching Video Information
This video, titled ‘Minecraft Modding Tutorial: Creating First Item’, was uploaded by Drew Chase on 2020-01-10 22:27:05. It has garnered 42 views and 0 likes. The duration of the video is 00:15:51 or 951 seconds.
—Links— Assets: https://www.dropbox.com/s/tinz7whmj9j4ipm/MinecraftModDevAssets.zip?dl=1