Hello guys and welcome back to the man c’mon tutorial in today’s episode we are going to create our first block which is going to be a tutorial or we’re going to register the blocks 8 the render and the texture as well as the item of the block So let’s get started first thing we’ll do create a new class inside of ice into the in it this called block in this block in it is going to be similar to our IP minute it’s slightly different as I have some different problems in here we have the First two main functions void in it and by go surf or go to survive in it and public has a right register and actually we’re going to have is it register block or what excessive right register block if you’re going to register the block to the to minecraft and will also register The item of block what I want to do here inside of register block going to have blocks block and roll shift over to import block like net up minecraft is a block for block inside of here first thing else do is put gameregistry don’t register block all what this does is Only register a block version of our block to again then we’re going to set the creators have block dot text crazy stuff two blocks up then going to create the item version of flop item bak back item equals new item block what controls is doe in parsing block by item block is it Gets a block and it gets the item version of a block which we named item and then we specify which block from to get it from block then we just hit the registry name of this item this is going to be getting it from the block so block Get registry in and finally we’re going to register the item so your edge of the block set is created tab then we create the item version of the box name it and then register the item next we can create into the function public static ride register renders all this is doing Is basically just registering what the image of the box in our case it’s going to be all so it’s going to be with one image of each side copied onto each side finally copy and paste this and call it register render block block going to very similar to our item code we’re Going to do minecraft for this the game get minecraft get the version get render Ison gets the item with new surrender then get the Ising model mutter and then we’re going to register it but cleanse it want an item in here we’re going to use function item dot get Item from block all this does which get this item version prior block and then where is located of the new model resource location as we imperiously reference table ID plus ak1 plus the blocks on localized name dot substring v in this one we do not use the inventory As this has found called arrow semi in this oh I suppose 0 and have metadata so items are guys have been block 0 new bottle resolves location we get the version minecraft render item model measure and then register as we in the previous episode next class again to Create a block so public static block and then name sorry law this in the future will be using you generate in the world and attracting mind ball you put it in a furnace nice stuff which we’ll do in future episodes then we’re going to initialize tutorial off this tutorial Off the equal to new custom off then we’re going to pop that and we’re going to create this we’re going to put it in our dot blocks folder which we don’t have yet a bit real great and whilst Jones games are going to extend custom block which I get to create as Well we’ll create that and this is going to extend block since the block producer off we’re going to require all the temperatures normal block but every extra functions we’re going to create a custom block it’s been using things that aren’t ours and other things out and then we’re going to Extend off it in custom all to create something else so it means create a constructor public custom block and here we’re going to want a few functions firstly the name and the hardness what the hardness is is how hard it is to break and then through This since our blocks are going to need this also asking you to do it has to me for a super all block cutting material so again has a super and then will the set the material as material dot most things going to rock tool set is rock if You ever want to change the material put just put this stock material a stop block material is equal to materials or whatever and you could override this function now all default slots will stay as Imperials are up then we’re going to want to set the name so click control Space or search functions set on localized name to name as Whedon the ISIL sex registry name to name I want to set the hardness hardness and get the resistance resistance give that a save 9 customer he’ll be wanting girls to create a constructor in the super of Breathing to create the fourth inside a custom block but also going to add a fourth one on here which we’re going to put interest unique integer I’ll tie up to exhale flow of a float is any decimal number and integer if any whole number so for this we’re going to put in Harvestable the harvest level its haps what level of pickaxe you require to be able to mine so we’re going to super off the three functions previously which means you’re after death to set them possibly set them in custom block and then we’re also going to have have sex harvest level all Are going to take out there we put pickaxe in quotes here it just occurs to the tool that’s required to break it and then the level that I call small a lot to which is an iron pickaxe and that’s called small and I’m blocking it it’s Going to ask us for four things are you going to be our name story aloft our hardness alpha is 2 pi Oh F for this one I’ll set as 4.08 reclaimer that is resistance which prepares to its blasters to how much it can resist TNT explosions and then for its high visible – I’m messing it up oh yes sorry Dena Madhuri – there’s meant to be harvestable it should be asking for the Harvey’s level we set here inside of lock in it so this is it the name this is the hardness this is the resistance and this Is the harvest which – refers to iron there refers to would bomb repairs are sown and through first and for refers to anything more powerful in diamonds which isn’t in Minecraft but if you were to create a costume pickaxe that might be able to mind something that has a and Had a habitable of four and you can create that now we initialize it then we’re going to do register box it’s a very simple all it slot is the name of block and of the rest of the work for us for register Enders very similar just register render sorry off The block will be in the game but it won’t shelf as a block cause we got how many models or textures so go into your source main resources and assets as we created very fast out into the models change to some items to block and also In textures also create a dot blocks you serve blocks and items in each models and textures now open up your reference libraries odd source assets minecraft’s models lock and just find iron ore here we are it’s a block cue ball which means only one texture face of iron ore as it will be Repeated on all sides let’s copy this and we’ll create our own new text document pin and we’ll just put key and coal along blocks and change this tutorial off and save this in our asset models block if you’re going to be tutorial on the score or stop Jason so This is just repairing the location of the block texture next we need to create the item model for this block but for the new text document again and inside of models for item your thoughts you’ll find a lot more because all blocks and items have their a model all this does Is referred to the parent block is so this is the first location block INR which very going to go into our entitles put TN : and put that tutorial into just going to the theme we just created the model tutorial off through the save in Torah mods last name Rhys off the bat Fit TM models items and cut the same thing final thing is block states which we need to create a new package for a 50 m CC these are heard to the state of the block our vlog states here I’ll be fine I’m off and we go up here and create a New front of the textile his normally we’ll put p.m. in front of models we actually put the p.m. in front of our name so p.m. : and then tutorial off did that save and place it in and again source name resource assets p.m. block States called tutorial observations have a double Check the roll call tutorial elevation is there then we can move on to the texture I’ll do the similar process to a ball paint.net not null paint paint useless paint.net I will search through the default textures also quick sneak peek at a future episode default textures blocks search for INR and I Will get paid orange transparency and place it on each of the non stone pieces there we go we save that quickly very simple and I’ll see minecraft following tutorial mods source main resources assets TM textures blocks tutorial on the straw or that’s that long bottle another one may Always make sure you sign be correct or can lead to lots of errors you haven’t actually initialized our block what we need to do go into our registry handle and once again put this time a nice minute block in it dot register renders block in it dot in it And block came to register do op both of these two on the common side and this one on the client-side once again we’ll go back to building blocks tab scroll down and we’ll see title dot style or name because we haven’t named it yet go into your resources assets Lang in us at Line this time piled stops toriel one just go off dot name equal to sorry often give that a save and it will load with the correct name as you can see we now have a tutorial in got and tutorial or and next episode we can work on Creative tabs and anything else you guys want me to work on please lead down the comments below thanks for watching this video if you have liked this video make sure to hit the like button go to the rest of them I’ll leave the playlist link down in the Description and if you do want to see more tutorials please subscribe to my channel thanks for watching climber’s and having and good bye You Video Information
This video, titled ‘Minecraft Modding Tutorial – 1.12/1.11 – BLOCKS! – Episode 4 (Outdated)’, was uploaded by Harry Talks on 2017-06-25 14:00:04. It has garnered 4289 views and 62 likes. The duration of the video is 00:18:23 or 1103 seconds.
Updated video: https://youtu.be/42z8_UDLmk4
Thanks Again for the amazing support on these videos which is why I’ve made another so quickly. Will have a windows tutorial up Tuesday as there are some people who want to see them and I like them. I’ll also have a video about F1 2017 coming out soon.Thanks!
Playlist: https://www.youtube.com/playlist?list=PLiDUvCGH5WEUEV9nc0Ll2pzUFmSFc21uR Subscribe: http://tiny.cc/sub2harrytech Twitter: https://twitter.com/harrystechrevs