Hello everybody we are back and we are recording another tutorial for minecraft modding and today we are going to do blocks and we are going to do blocks in a similar way so we’re just going to do this part first mod blocks dot in it let’s come back uh what the hell’s mod What is mod blocks well my blocks is a new class all right in my blocks we’re going to have a public static void in it and then we’re also going to have oh also i thought i should do this on camera we’re going to call this instantiate And we’re going to change that in the item one two and it’s not public private private static void register and public static void register models which is another one we’re going to change in uh mod items it took me a second to get that so public static map Blocks is equal to a new hash wow hash map and we’re going to say string blob block and we need to specify that over here of course and apparently i can’t smell that or i can make map not the map import map and drop it at utility awesome So we’re going to say a new mod block this is going to take in strings as well it’s going to be tutorial tutorial or and tutorial i don’t know well i guess we’ll just call it tutorial block and we’re going to create this class dot blocks this is going to extends net dot Minecraft dot block let’s come back you need a constructor for this so we’re going to pass it this constructor i’m just taking the string registry name and string and localized and i guess we’ll take in a material too because this dot set registry name registry name oh okay registry registry name this right But now it’s like i need you need a material so material dot rock and here i’m going to put a comment this is the tutorial tutorial walk but this time we’re going to do material dot oh i forgot what it was material.i dash dash tutorial block okay Let’s see put these in the wrong method i’m x proof instantiate and register there then register is just going to loop through blocks like we showed before with items block step out like this i keep forgetting that then just okay registry dot register and we just pass them block Items and block both go into that method meth method because it takes a i forge registry or something like that i’ll show you in a second um let’s just copy this um then we do the same thing model loader well we do almost the same thing model loader dot set to custom Model as you see it takes in an item model resource load okay takes in an item how do you get an item from a block luckily all blocks have an item attached to them which is actually something we forgot to do up here we need to do game registry dot register new Item block and then we pass it block but then we want to do that set registry name block.get registry name and import block so obviously there’s an item block associated with this so we call item dot get item from block we pass it block now we pass Into metadata which for this is going to be zero new model resource location string block dot get registering name comma space inventory poof now that’s done recall that we need to go into here and we actually need to go into the client proxy which can’t do that from there Don’t mind this i was just looking at the source code for minecraft which you can’t do thankfully client proxy then we need to call mod blocks dot register models and i’m going to come in here change this to in stan sheet and you to register models just to uh make it better Safe get rid of the air thank you eclipse so this will add a block but we don’t have our json set up luckily i think i know blocks a little bit better than i know items so res new package assets dot tutorial dot models dot blocks and a new package Oh okay asset assets dot tutorial dot block well okay block state now then we’re going to create a new file in block states and it’s going to be tutorial tutorial or i need to change that dot json i made a slight error i think we want you to be lowercase Open and close these um variants variants rather open inventory which is also another one of these then we just say model and then we point to save that and actually get air because we forgot the semicolon all right now then we need to go to blocks create a new file call it tutorial Or dot json hopefully i’m spelling these right here we need to specify a parent the parent is going to be blocks dash box dash cube underscore all comma forgot that last time i want to say it’s textures if i can spell textures and then we just do all And once again i’m just going to use a vanilla one blocks dash blocks dash stone is all i can come up with right now so we’re going to use stone then we actually need to make an item model which item model is actually rather easy so we just do file tutorial Or dot json in here we literally just need to specify a parent and the parent is going to be tutorial colon to blocks dash tutorial or i hope i spelt all that correctly now then if if i got this part correct which i’m not quite sure i did it correctly And i will be back once minecraft has loaded okay guys um what actually happened was when i was recording blogs i must not have clicked play when we were fixing things or something like that so we ran into a couple problems when we were trying to make blocks The first time so the code there was not correct completely it was it was in the json files so the i’ll show you one block state so we have variance and then we have to do normal not inventory even though we do specify inventory i don’t i don’t know why it’s Supposed to be normal and then we point it to r mod id colon and then that just the name just the name of the json which in this case is tutorial or and then in the block model for tutorial or it’s parent block dash cube all textures all that works Once again you’ll need to put your mod id and then a colon before you specify the texture you also need to specify blocks there then in the um also something i changed instead of it saying models dot block or model stop blocks it’s the same model stop block So that’s a change which also has to be represented in everything even in here so mod id colon block dash tutorial or and this should work also one thing i changed in the actual code was in mod blocks i accidentally put tutorial block here all of you must have been yelling at me I like completely spaced out i recorded it at night time which i’m probably never going to do again so let’s uh let’s see the final project here and i’ll be back once minecraft is loaded alright guys we are back and let’s see the final project that does work Because it worked when i left it oh no minecraft’s not responding that’s great i know why it’s not responding too but it doesn’t really matter are you going to load minecraft or oh there we go as you can see we have our tutorial or and our tutorial block which i i didn’t Want to create textures for them okay at least not on camera and i didn’t do it beforehand so we have our tutorial item and i didn’t put them in the creative tab so just to prove that they aren’t just renamed blocks i’m going to give that well okay slash four see hey Now then i’m not sure why it went oh okay that’s all for this episode next episode i think we will be covering crafting recipes if not it’ll be more about blocks so yeah see you guys next time Video Information
This video, titled ‘Minecraft Forge 1.10.2 Modding Tutorial Ep.3 Basic Blocks’, was uploaded by Them Derpy Gamers on 2016-09-07 00:19:42. It has garnered 306 views and 2 likes. The duration of the video is 00:16:21 or 981 seconds.
This is my first modding tutorial on Youtube, I help out on the forums under the “alias” Animefan8888 and I though since there are no tutorials out there for 1.10 at all. I might as well make them myself, so if you have any suggestions or something for me to covers just leave a comment for any questions on the code leave a comment, for any debugging ask on the forums as it is really hard to read code on Youtube comments.