So now we’re going to go into your the num tutorial material or whatever you named it so what you see up here is um stats this is where you set all the stats for your weapons and tools so to add more you add another line and Put a little comma after it but to let the game know there this is the last line you put a semicolon so this is how it works these i didn’t change to what i want so these are the mining levels so i want ruby to be able to mine diamond door but not Obsidian so i want it to be mine the same stuff as an iron pick i want sapphire to be able to mine obsidian and i want topaz to mine diamond door and under the next number is the uses i’m gonna guess this was gold because it’s set to 59 But i want ruby since it’s just under diamond and diamond has like 1 000 something uses i want it to have 800 uses i want sapphire since it is a little better to have a thousand uses and i want topaz what i’ll do with topaz is i’ll set it To 500 uses but i’ll make it extremely fast okay the next thing is efficiency on proper material this is what i was talking about speed earlier basically this is how fast it works on the item so uh yeah so topaz i’ll put two like an eight which will make it go really fast Sapphire i’ll keep it a four a four which is like about average and then i’ll move ruby up to a four as well okay now the next number is damage versus entity so ignore the zero because that was something that i removed if you use my class basically in The item sword we’re gonna go back for a second the weapon damage it gets the damage get damage versus entity from material get damage versus entity damage versus entity right here so this goes from here to here to here to here to here and this sets how many half Hearts of damage it does minecraft traditionally does this or sorry for left so basically it the sword always does two hearts of damage or four half hearts plus whatever you add i removed that because i personally like to have it totally controlled from in here so what i’m gonna do is the ruby I’m going to have it do four hearts of damage and for that that would be eight since half heart so four times two is eight yep um or actually i’m going to have it do three hearts for six i’m gonna have sapphire do eight and then topaz since It’s really fast i’m going to have it do a five so four or two and a half hearts of damage per swing the last one is enchantability basically the higher the number the easier it is as you can tell uh sapphire it as right now it’s really Hard to get a good enchantment on it while ruby which was originally gold is really easy so i want ruby to be so 12 is about 10 to 12 is about normal so i’m going to set it at 11 for be out average since sapphire is really hard and it’s Good powerful i’m gonna set it to like 14 and then topaz since it’s really fast but weak i’m going to actually set it to a 16 and then take off another 100 uses so you get 400 uses but it’s really fast and you can enchant it very easily So then you don’t want to mess with any of this because these all these functions are used just to get information kind of like the sword but that are private so that way they can’t change it but they can still access it and the last thing is down here get uh crafting material I actually forgot to does that work oh okay hold on a second uh okay basically this tells uh the game when you put it into an anvil what item do you need to repair it i forgot i’m gonna have to go uh get the other one i guess i copied the Wrong one um you have to use the metadatas since these are metadatas but i just set default to dirt this won’t be called because there is no default we’re only calling these three but yeah so i will be back when we have all right guys i am back so after Looking into my mod which uses something like this i found out that um i haven’t figured it out yet so if i do there’ll be an annotation here if not um i’ll try to get someone to help me out and figure that out if you do know leave a comment below let Everyone else know that’d be great so for now i’m just going to leave it item gem so this one will work because the first one is ruby but these two are going to need rubies to be fixed which is kind of weird but we’ll just leave it for now Another thing i noticed when i was looking is i forgot to do this in my other mod what i do is i have this line right here this is for the new 1.5.1 update this gets the texture so basically you enter your mod name here you keep acts shovel or pick i i’ll I put them all in there i’m only showing axe off because it’s the same and then i did something called tool material or name on my other ones i did name so i’m going to switch it to name here and basically what this does is you set the name and it uh It goes out with the name and gets the texture file because they’re all stored in the same place and you just have to change axe to pick to shovel or whatever class it is and then i added a new string and then i made this string equal what you enter here But that is why we’re getting errors here so now what i’m going to do is i’m going to type ruby and so basically this will fix that error for all so then what you do is you copy it into each ruby one uh we need to put space there oh Make sure you put it inside of parentheses so it knows that it’s a string rather than an integer or something else a variable i guess you could say okay and then you’re gonna do the same for these oh there we go so yeah so basically it’s For all these items it’s the exact same process you just have to uh like change what the item is and then name it differently sapphire also while uh i took that little break i put all the texture files in from my other mod so the colors will look really off but i Mean at least you can see how it works and that should do it um i do want to make sure um okay that’s a good thing i checked so we’re going to do this dot set creative tab and then we’re going to do creative tab Or wait hold on one second i don’t think i need this because if it’s in item tool which it is okay so yeah it’s going to put all these tools in the tools tab and that will be good that’s what we want so then this should work let’s uh run it Oh i did not add the swords okay um i’ll keep i guess once it ends uh let’s create i do not have textures for the swords because my swords are still i’m still working on them for my mod so i do not have the sword textures in If you do have sword textures you need to um no stop yes okay actually i will throw it i’ll show you how i did it with the sword this will be a little more different because it’s a bigger clasp but same thing so you’re going to copy this update icons And you’re going to put it wherever i put it right here just so i can do it and then you’re going to change this to sword but then but you do have to remember that whatever you change this to the prefix has to be stored so like what i Do is for my file naming is um i put what it is beforehand kind of like i do what i did in the code um texture design so i call it axe ruby axe sapphire and then so basically it knows this folder with sword plus the name and the name will be Up here so we’re going to add a new private string we want it to be private so that way other classes don’t accidentally modify it because sometimes when you’re doing stuff you bump something everything gets screwed up so we’re gonna do a new string name so they’re gonna have to turn into String okay there we go so now we can add in our sword i think i might have to break this into two tutorials um oh good thing i checked four you need to change all the ids to uh i do just one higher to keep it simple But yeah they can’t be the same id otherwise you’re going to see things like they’re overwriting each other and that’s exactly what you don’t want so we have sword sort yeah and so basically it’s the same layout for all the tools you just need to change the uh oh i do Need to change that okay um i need to change this to new sword and then i’m gonna copy this to all of them okay there we go that should work and so that’s basically how you do tools the recipes the recipes are the same for everything um yeah I i guess i could i should do another quick tutorial on recipes they’ll be really good i’ll do shapeless and metadata metadata shapeless and all that stuff so now we gotta wait for it to load up and any day now okay i’m gonna cut back in when it’s oh Okay it seemed to be loaded up so or did it yeah uh one thing that i noticed a lot of people don’t do unless they’re like advanced modding what you can do is you can add a line like this system dot out i mean i can spell dot print line Like this and then what you can do is you can have it print variables so i can have it print um i don’t if i made a variable up here called private i mean i cannot spell test equals zero oh i need um it’s gonna be an int so Test i can have it print this test to the console so when you’re debugging your mod or testing for bugs you can do that if something’s not working or any of that so is it oh yeah downside of the new texture thing is it takes forever to load up your mod or Like if it’s not if you’re using mcp it takes sometimes a long time to oh that’s that’s cool okay here we go um yeah let’s continue loading i don’t know what oh okay nevermind we didn’t do this the items are glitched okay so uh my fault i did forgot to check even Higher up so this one’s gonna be five this is going to be six this is gonna be seven this is gonna be eight this is gonna be nine it’s gonna be ten this is gonna be 11 12 and 13. okay so there we go this should work so yeah The code will be the final code so everything should work you’ll probably be getting this copy i’m not seeing anything weird over here just textures i think these missing textures are the swords yeah this loaded up way faster okay there we go uh yes um okay Yeah as you can see it changed from a shovel looking thing to an actual pick now so let’s go into tools and there we go we have our ruby pick our sapphire pick we have our topaz pick ruby shovel sapphire these two shop probably should have been switched uh topaz shovel ruby axe Okay so let’s do a little demonstration that breaks really quickly that works really quickly and that breaks extremely quick oh i’m in creative that’s why uh game move zero okay so about normal a little quicker really quick and that affects everything so not too bad better even better okay now we’re going To try the last one axe a little faster and really fast so as you can see that it affects everything so now we’re going to go back into creative and we’re going to get the swords the sword since the sword class automatically adds it but you can change It to here we are see oh i forgot to add names to him but no words we know it’s ruby sapphire topaz so let’s spawn some mobs pig okay hold on that is one thing i do not like about mcp is even though my computer can handle all these settings normally for Some reason it just doesn’t like okay okay so there we go let’s try it let’s see how many hits one two okay two these are not going to differ that much because since this has so little life too yeah but uh it does do more damage based on what you did so that’s It for this tutorial guys like i said if you need to do an item ho uh just do it the same way we could probably do one real quick but there’s no point i’m hoping that you guys haven’t get got the gist of it if you guys have any questions feel free to Leave it in the comments below that’s it so so don’t forget to subscribe if you want more game play throughs of not only minecraft but planetside 2 and game updates visit my friend’s channel toxic troublemaker link will be at the end of the video you can download all the source code in the Description or at the end of the video from mediafire and that’s it guys if you have any other questions feel free to ask that’s it for me and have a great day bye you Video Information
This video, titled ‘Minecraft Modding 1.5.1-Code Breakdown- Adding Custom Tool Set Part 2’, was uploaded by ChickenNuggsterCode on 2013-04-17 01:42:56. It has garnered 177 views and 2 likes. The duration of the video is 00:15:56 or 956 seconds.
In this tutorial I cover how to make a custom tool set in Minecraft V1.5.1
~~~~~~~~~~Links~~~~~~~~~~ Source Code: http://www.mediafire.com/?7l26rbri11nq7p1 ToxicTroublemaker:http://www.youtube.com/user/ToxicTrou… Part 2: Coming Soon
~~~~~~~~~~Code Breakdown~~~~~~~~~~ What are we doing? Creating a Custom Tool Set
What does it work for? Forge and ModLoader if you add the name it the other way.
Why do I need this? For any content mod you need at least one tool set
What special Java aspects do we cover? None