Hello hello hello everybody and welcome back to another minecraft modding tutorial for version 1.19 in this tutorial we’re going to be covering how to do armor so armor is pretty simple it’s basically the same as tools and but maybe a little more complex so let’s just get started with it So obviously the first thing we’re going to need to do is create our armor items luckily this is literally the same as tools pretty much so we just want a public static final registry objects of armor item and this will be example helmet we’ll start with the helmet and Go down to the boots is equal items dot register example underscore helmet and then we just want a supplier of a new armor item and this just takes in an armored material which for now we’ll put null then it takes in an equipment slot so This is the helmet so it goes in the head and then we just want the properties which we’ll just put props which is our method we created previously okay fantastic now we just need to do this for the chest plate the leggings and the boots so let’s just go through And change all of these accordingly so example underscore chest plate example chest plate and for the equipment slot we want the chest then we have the leggings so leggings leggings and for the equipment slot we want the legs and finally we want the boots which we can do here with boots And for the equipment slot we want the feet there we go okay fantastic so that is all the armors registered now as as the same as we did in the previous tutorial we’re going to need a tier so as you can see here in the constructor it looks for an armor material So we’re going to need to create one of those similar to how we created our tool tiers down here so first of all let’s create another subclass electric final uh armor tears now one thing i should mention this here of course but the other thing is I have renamed this to tool tears this was previously just called tears the reason i renamed it is because obviously we’re now we’re creating armatures so it just made a little more sense to keep them separate now unfortunately forge does not have a class like they do with the tool tiers So we’re going to have to create that class ourselves now inside of our main package i’ve created a new package called base and this is just where we’re going to have all of our base classes that we can extend the things off of so let’s go ahead into this base Package and let’s create a new class now this is actually going to be a record so if you don’t know what records are they are a new java feature i believe java 16 maybe 17 maybe 15 not sure but then you anyway so i’m sure a lot of you have not used records Essentially what they are is just a class but all of the fields are private final and have getters by default it’ll make more sense in a second so let’s call this class um mod armor material you can call it whatever you want of course um i’ll say at yes okay Now this is going to need a few things so the first thing you’ll need is a name string name you’ll also need a int durability i’m also going to need an int array for the amount of default protection it will have so obviously that’s the four slots is the inter array there Then we have int enchantability which is just how enchantable it is then we have a sound event and this is the equip sound now it’s important that you import the correct sound event here so that’s just net.minecraft.sounds.soundevent you don’t want to get the wrong one that could cause issues Then we want the float we want a float and that is the toughness and then we want another float which is the knockback resistance and finally we want a supplier of ingredient and as before this is just the repair material fantastic so now we’re going to need to create a few little things Um actually the first thing we’ll do is we need to implement a class and that is the armor material class you’ll see that gives us an error and that is because we are missing some methods that we need to override so let’s press implement methods here and we’ll just say all of those Now let’s rename these two to slot slot okay fantastic so for a lot of these we can just return what we have so for example get defense for slot we can turn return this dot protection and go slot dot index inside of the square brackets enchantment value We can do this dot in charge ability it’s meant to be a dot not a comma a quick sound we can just do this little quick sound uh this dot repair get repair ingredient we can have this dot repair material dot get for the name we can have this dot name Now one thing we’re going to do for the name is we’re actually going to add something to this so we’re going to go tutorial mod for your main class dot mod id plus colon plus this dot name and the reason we’re doing that is because we need to make Sure this name is using our mod id and not in the vanilla package so after that we can do the toughness which is just this dot toughness and finally the knockback resistance which is this dot knock rank resistance now as you can see i’ve left out this get durability for slot method and That’s because we actually need to do something a little bit different here so we need to create a private static final int array and we’re going to call this health underscore or we’ll call it durability underscore per underscore slot is equal to a new int array And we’re going to put some values in here i will give a brief explanation in a second so that’s 13 15 16 and 11. so what on earth is this you may be wondering and i’m also wondering that because i’m not completely sure however from my understanding this is Essentially an array which has the durabilities for each slot so or the the base durabilities so as you can see here we have 13 so this would be the helmet no this would be the boots i mean it’s the boots yeah and then 15 this is the Leggings 16 this is the chest plate and 11 this is the helmet so essentially from what i understand these values represent a default base durability amount that can be multiplied onto each so for example let’s say we set this int durability here let’s say we set that to 10 right that would mean that the boots have 130 durability it would mean that the leggings have 150 it would mean that the chest plate has 160 and obviously the helmet has 110 so it’s a matter of um this is just what will be multiplied to get the correct durability for each slot Now obviously you can change these values so say let’s say for whatever reason you wanted the chest plate to have um less durability than everything else you can do that that’s perfectly fine but i’m going to leave these values in so these are just the default vanilla values by the way I’ve literally just copied these values from vanilla but you can change them how you wish see how it affects your armor maybe you’ll want to put different values depending on how your armor works uh i don’t know it’s up to you and obviously if you wanted to you could Obviously pass this int array into here in fact you could completely remove this durability here and pass this as an integer race you could have an integrate durability and in here you could just say durability then square brackets index if you wanted to however i’m going to be using durability per slot And i’m going to multiply that by this dot durability let’s just make sure that’s still an integer and that’s essentially um essentially what we want to do i’m just going to go ahead and fix these warnings so i’m going to annotate them with not no that’s just a weird intelligent feature And yeah that is pretty much it for our mod armor material class from there we can go ahead and just create the arm up material so public static final and this will just be an armor material i’ll call this example is equal to a new mod armor material okay Now i’m just going to put some random or at least pretty much random values in here i’m not personally going to worry about it too much so obviously the first thing we need to put in here is the name then we need to go ahead and put The durability as it says which is not a string so the durability i’ll just put um i don’t know 500 um and then we have what is it the the inter array for the protection values so obviously as before this starts with the boots then it goes leggings just like helmet I’m going to put something like um 20 40 50 10. just trying to make sure i get those values correct then we have the enchantability so i’m going to put like 300 i’m not sure on the base value for in charge ability i’m not sure exactly how it affects the Enchantability however i’m going to put like 300 i think that’s fine and let’s give it a sound event so we need to use the sound events class plural and then you’ve got all these different sound events that you could use i’m going to use um i’ll use diamond but obviously you Could use any of these it’s completely up to you or you can use your own sound which i will talk about in a future tutorial after that we have the toughness i believe so i’m just going to give it a zero toughness uh it’s a complicated thing to explain Uh and then we have the knockback resistance um once again i’m going to give this to zero and then we have the ingredient so we can actually just copy this from our tools since we’re going to want the same ingredient here as well fantastic so are these not aligned or Like what’s going on here okay let’s let’s move them up to a new line just so we can see exactly what’s happening and this one okay great okay so let’s move example down durability down move this down move this down move this down move this down move this down and move This down there we go that’s a little bit better it’s not that much different but it’s a little bit better okay so those should be our armor tears now we can use these in here so on the tears example now something i actually didn’t mention in the last tutorial um Is that you can use the vanilla tears if you wish so to do that it would just be armor materials plural and you can just use a vanilla one so you know gold for example and you can do the same with tools as well for tools That would be i think it’s called tears plural and then whatever tear you want we don’t want to do that we want to use our own in all of these there we go let’s just add this to oh what’s this no i think i’m actually looking for the other issue here Save to dictionary there we go just get sort of that little stupid spelling thing which i might actually remove from my settings anyways all right apart from that we now just have a few jsons to go through so let’s go ahead and do those as these are just very simple they’re not Any different than our normal jsons so let’s come into our lang let’s just do that first so item dot tutorial mod dot example underscore helmet it’s just example helmet and i’ll copy paste this for the chest plate leggings boots replace them chest plate leggings boots boots leggings chest plate Fantastic it doesn’t like this either so let’s as well add that to the dictionary fantastic okay the next thing we can just do is the item models so we can just copy example item here and use helmet yes i spelt that wrong of course i did refactor rename helmet effector And here as well helmet and we just want to do that for the chest plate whatever chest plate then we want the leggings and let’s make that don’t ask again that’s just annoying and finally the booties now i’ve already created all of the textures for these i’ll just show you those right now So here they are just in here all of them are in there and obviously you do need to also create the textures for the actual ink in model like in-game armor so the armor that you’re wearing so i’ve created these as well you need to name these slightly Different and put them in a slightly different place than you may expect so these need to be inside textures and then models and then armor and inside of there you have whatever the name of your material was so i was putting mine as example and then it’s underscore layer And for the layout with the helmet chest plate and leggings you want to have layer one and for the boots you have layer two okay that should be pretty much it um let’s run the game and let’s check if it works voila here we are in the game so Yep here is indeed our armor let’s go ahead let’s put it on as you can see it does have the correct equip sound and yeah that’s that’s pretty much it um we can check if it works also let’s cut down this rain man it needs to stop We can check if it works so let’s go game mode survival let’s summon a zombo hit me yeah i mean it’s pretty good it’s pretty good armor stop that stop stop stop burning me mine’s burning me it’s pretty fire man that’s pretty fire anyways yeah i hope you guys did find this Tutorial useful if you did please do be sure to smash your face into that like button and subscribe really enjoyed please be sure to share it and uh yeah i’ll see you guys in the next tutorial we can do some recipes sir permission to leave the station for What purpose master chief i’m gonna go bang your mom permission granted Video Information
This video, titled ‘1.19 Minecraft Forge Modding Tutorial – Armor’, was uploaded by TurtyWurty on 2022-07-07 16:30:07. It has garnered 3966 views and 92 likes. The duration of the video is 00:20:51 or 1251 seconds.
Hello everyone, in this video we will be making our own set of armor (helmet, chestplate, leggings and boots)!
In the next video we will be covering tags and creating our own tag that can be used for our tool set! Remember, if you have any problems, please join the discord that is linked below!
–Links– Patreon: https://www.patreon.com/turtywurty Discord: https://discord.gg/BAYB3A38wn Github: https://github.com/DaRealTurtyWurty/1.19TutorialMod Trello: WIP