Hello hello hello everybody and welcome back to another minecraft mining tutorial for version 1.19 in this show we are going to make our blocks breakable so we can actually mine them and pick them up this is actually extremely simple so let’s go ahead and get started So there is a little bit of code we have to do and that is actually to tell our block um how hard it is so how long it’s going to take to break and that is just a really simple block property so i’m only going to be using Our first example block for this we’re going to leave the example to a block just because to be honest i can’t be bothered to do both of them actually we’ll only do the example 2 block because this one’s really got some properties so we’ll just give this one some properties Now the property that we need to get it is i believe called strength here we go so there is two methods with strength so there is a number one and an overload now the first one this one with just one float is the strength it’s the hardness and the resistance and This top one up here is the hardness as the first parameter and the resistance as the second so what’s the difference between the hardness and the resistance essentially the hardness is how long it takes to mine the block and the resistance is just the blast resistance So how resistant it is to an explosive for example i know i said resistance a lot there but you have to have to bear with me there so we’re actually going to use we’ll use the first one okay so i actually don’t remember the vanilla values but you can always go ahead and Look those up in the minecraft code and with intellij that is just double shift go to classes and you can search in blocks and you can open this block class and look at what vanilla has as the default values if you’re in eclipse then you can press ctrl shift t And you can do the same thing so you can go ahead and look at the vanilla values meanwhile i’m going to just give a guess so i’m going to say we’ll do about 2.5 for the hardness and um 18 for the resistance i think it’s something around those Values i haven’t really done this in quite a while but i think that’s about the same as an iron block maybe not sure so yeah that’s those we’re gonna have dirt same as an iron block anyways um obviously you can do your other properties on here as well if you want So for example there’s actually an explosion resistance property which now is a little bit confusing because i’m pretty sure that’s what the second parameter of this does but maybe they just have a different method for that i’m not sure is there anything else we want to do um let’s just have a look No i think that’s i think that’s everything okay fantastic so that should be all the code that we need so now we’re going to go into jason time now i know that we don’t like jason he’s not a great guy but unfortunately we do have to put up with him quite a lot So this this is going to be one of those episodes where jason is going to be everywhere you know we can’t stop him so let’s create a new directory in our resources folder and this is going to be called data and we’re going to create a subfolder for Our mod id so tutorial mod and i’m going to do that again and this one’s going to be data but instead it’s going to be a minecraft so we need both of these now let’s come into Um which one should we do first let’s do the loot table first shall we so let’s come into tutorial mod here let’s create a new directory and we’re just going to do loot underscore tables forward slash blocks and while i’m here i’m just going to create another folder so that’ll be tutorial mod Loot underscore tables forward slash entities i just want to sort of separate this out a little bit just so we can see everything that’s actually here and i’m going to do that again so tutorial mod forward slash and instead of flute tables i’m going to do recipes Okay fantastic we’ll need that later on maybe if you get that far so let’s come into this box and this is where we’re going to make our loot table now i’m going to bring you to a fantastic website here so that is called missode.github.io and if you come to here This will bring you straight to the loot table one where you can actually just generate a loot table so this is fantastic it’s very very handy it does a lot of the the work for you so do i have dark fruit on no okay fantastic so yeah you can obviously Change it to light shouldn’t have done that um yeah but you can choose a preset so say for example um Let’s say we wanted dirt as our loot table then boom this is your loot table you can just copy it come back into intellij create a new file and this is just going to be the name of your block so example two i’m just gonna block dot json and plop it in There you go so you can also we’ll do another one for our other block as well just just the loot table not the not the other stuff so we’ll just do this oh right we need to change dirt to our block name of course so example underscore block There you go and just do the same for this one so example two underscore block and boom now we have a loop table so that will now drop our item the next thing you need to go ahead and do is we’re going to come into the minecraft directory and we’re going to go Let’s create a first create a new directory for the recipes and once again we’ll go minecraft forward slash tags and inside of tags we’re going to go straight into blocks and we’re going to create another one for entities we’ll do fluids first so we’ll just leave that there for now And we’re not actually going to use those so let’s come into this blocks and if you want your block to require a specific level of tool then we’re going to want to create a new file in here now i want mine to be only mineable by iron or above So what we need to do is we need to create a json called underscore iron underscore tool dot json and all you would do say you wanted wood is you would replace iron with wood or if you wanted stone you replace it with stone if you’re diamond you replace it With diamond you’ll never write you replace it with never right etcetera etcetera i say etc there isn’t any others but still you get my you get my drift so here basically is what you’re going to need to put in here so i’m actually just going to copy paste This in here to save a little bit of time um it will be in the description well my whole github will be in the description so that with that we actually just need to use two there though because we’re gonna do that one so essentially what this Does is it’s saying it’s not gonna replace the vanilla values um and it’s instead just gonna add these ones in here say you wanted another one to be in here all right tutorial mod pull on example underscore block boom now you have two values added we only want one in fact let’s Let’s create another file here right and let’s call this um we’ll have this one needs underscore um stone underscore and we’re just going to copy that in there there we go so now we have one for stone one for iron and we’re going to create another directory this one will be called minable Now in here we need basically this it it’s the exact same thing so we need another file and this will be basically the type of tool that is required so for example say you want it to be mineable only by pickaxes then you put pickaxe in there if you Wanted to only be mineable by shovels then you put shovel in there for example we’re just going to stick with pickaxe because i think that’s sort of the um i don’t know it’s just sort of the one that that works and boom you put that in there um You know let’s do acts as well just for the sake of doing acts and we’ll just put the normal example one in the axe and example two in the pickaxe boom i know i said we weren’t going to do it for the big example block but um We might as well at this point right like i don’t really see a reason not to so okay for this one we’ll just say one f and five f should be f as well and that should be it i hope i did that right um there’s only one way to find out so Let’s go ahead and run the game shall we okay i just realized i paused the recording at some point i’m not exactly sure when i paused it but i’ll basically just go through what just happened so um we messed up in the loot tables uh it was minecraft instead of tutorial mod in Here just very simple issue and i’ve reloaded back into the game now and we’re just about to test them uh hopefully that’s all i missed i think it should be so let’s first okay let’s place down how many of these do we need to place down okay let’s place down four of each Okay so we’re first going to test the iron axe on Example block so that picks it up then we’re going to test the stone axe on example block that picks it up then we’re going to test iron pickaxe that also picks it up and then we’re going to test stone pickaxe that picks it up so Let’s go and have a look why that is because i completely forgot what we did with that one all right so if you’re going to minecraft tags blocks minerable so we’ve got needs iron tool which is the example to block so needs a stone tool which is the example block And if you’re going to pickaxe interesting oh right i remember okay i haven’t done this in a while so you have to bear with me a little bit there was another property that we need coming to here there should be something like requires correct tool for drops there you go So okay if we just rerun the game and come on stop thank you if we rerun the game now this one should require the correct tools this one will not hopefully that should work this time pretty sure it should i’m like 90 90 98 sure this should work okay we are back Let’s first test the iron axe again so that works stone axe that works as expected now iron pickaxe should not work i believe just check correct and stone pickaxe it’s gonna take a whole minute but it also should not work correct now we should be able to mine These ones only with our iron tools so let’s first test the axe correct now let’s test these stone axe okay interesting pickaxe pickaxe right because we didn’t we didn’t do this so it doesn’t require the correct tool and also Is this the block i think it is that’s example two block yeah anyways that that did work as expected i believe you just need to make sure you have that one line of code uh here as long as you have that it should work as you expect it to work it seems to Work a little weird without that i will put that on here and i think if we’ve re-ran that now that should work fine so 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 if you really enjoyed please do be sure to share it and uh yeah in the next tutorial we’ll do creative You Video Information
This video, titled ‘1.19 Minecraft Forge Modding Tutorial – Block Drops’, was uploaded by TurtyWurty on 2022-06-24 16:30:01. It has garnered 3310 views and 103 likes. The duration of the video is 00:16:26 or 986 seconds.
Hello everyone, in this video we will be making our blocks drop items when mined!
In the next video we will be making our very own creative tab! Remember, if you have any problems, please join the discord that is linked below!
Loot Table Generator: https://misode.github.io/
–Links– Patreon: https://www.patreon.com/turtywurty Discord: https://discord.gg/BAYB3A38wn Github: https://github.com/DaRealTurtyWurty/1.19TutorialMod Trello: WIP