Hello guys and welcome to the fourth episode of the minecraft mod tutorial series in tears episode we’re going to be creating our first block so let’s get started in the lists we’re going to create a new list obviously called block list and we’re going to declare a new Block public static and the name of your block miles be tutorial block control shift go to import block and make sure you choose net dot minecraft block block and keep that save we can close out a block list for now then here down in register in the registry events class We’re going to create a new register function rename this to register blocks change the registry event to a block registry event a charter to have to import block again make sure you choose the correct one and then remove this item and inside of here we’re going to Register our own block block clicks dot tutorial block equals a new block and Salif here we’re going to have block dots properties dot creators it wants us to take in a block material so pop material dot and then there’s lots of different types you never look through Each of these materials if you want and figure out what their properties are but for now I’m just going to choose materials to iron and then we can add after this lots of different properties about the block you can do dot then there’s hardness and resistance there’s Two options for this there’s one that takes in the same value for both hardness and resistance and there’s one that takes in different values of hardness and resistance so we’ll take the different what values one and obviously you can mess around with the different values to try and figure out What’s more appropriate for the block you want to create but you can put something like 2.0 F or phone to float if you don’t know that a zero you should and the resistance I’m going to put 3.0 F I’m not really sure how this affects things as I said you’ll Have to test it for yourself to figure out and what happens and for yourself there’s also the light value and property this takes in an integer and between 1 and 15 I believe and this is how light comes light the block emits something like glow stone will emit Light and Resta lamps etc and if you’re you want your block to a missile light level then you can add this property if you don’t want it to you can either put zero or you can just not have the property whatsoever and put five for now so I can demonstrate how this works Dr. sound this is the sound that you want to make when your bot breaks so put sound type dot and there’s lots of different types here and put the metal and sound but you can again and try out different sounds and decide which one is most relevant to your think in a future Tutorial I will show you how to cut your own custom sounds and but for now just choose one from the basic minecraft sounds dot set of registry name this will be exactly the same as the way we do it for items so plot location and then put tutorial block so we have crazy Our block and set the material the hardness the resistance the light the sound and the registry name to minecraft a block is just the thing you place down the thing you’re holding in your hand and when you place down the block is actually an item so and this is Something called an item block we have to be dredged to this inside there items function so put a comma and leave some space between the actor items and the blocks we need to go back into item list and add our own tutorial block into the item list so public static item Tutorial block and then in here item list doctor toriel block is equal to a new item block this takes in a block itself so block list dots tutorial block and it also takes in an item properties so new item properties dot group so we’re going to Set the creative tab for our and block here we can do item group you can put it in miss kaswell i put it in building block so you can put it back you want the next tutorial work could be on creating your own creative tab so um if You’re looking forward to that leave a like down below and subscribe so you don’t miss that tutorial and we also need to set the registry name i need to import this first with the ctrl shift o then you can put dot set registry name you can put block list dot tutorial Block dr get red as your name that’ll mean that whenever we update the register name for the block it will also update it of the item block as well you want to change this item registered here in blogger two blocks registered and we have successfully declared our own block But as i said in the last episode if we leave it there then there will be errors with names and textures and models so we’re going to have to go into source and resources but unfortunately for us blocks also require an additional on top of Lange and models and textures We’re gonna have to athlete creates a new color-block state dot block states create that our package inside of assets tutorial Mott and a block states basically a block can be in lots of different states so it can change depending on external factors or internal factors such as something Called tile entity and so things that are going on inside the block will change the appearance or the way it interacts with people etc etc lots of different ways you can change a block and also different block states that block can be in but for now our block State is going to be in the default block State so you want to go into client data assets minecraft blocks tapes and find the most generic thing possible which I think we can use an iron block this is very generic it only has one variant which is just the Default variant which is a blank quotation marks so instead of lock States create a new text file paste that in save it tutorial mod source main resources assets tutorial mods block States and call it tutorial underscore block dr. Jason close it open it again and it’ll be in our text editor and then The model here we’re going to need John 180 tutorial mod colon block slash and then the name of your block tutorial block and this is telling for this default block state we’re going to go to the tutorial block model which we’re going to create in a second if there are lots Of different other variants we could have it sets different models so it would look differently depending and we will do that in a future tutorial now in the line file we’re going to need our and the second entry in here comment then you can change this to Block dr. Tyrell mod dr. toriel block and change this tutorial block so this block will be named toriel block then models we’re going to need to create a models block and again we’re going to look at the Minecraft default models models block and again we’re gonna look At the iron block as it’s just quite basic doesn’t have any special properties so copy that create a new text file paste it in save it and name it as tutorial block Jason close it open it and before this put your my ID tutorial mod : lock slash and then tutorial block Blocks actually even item model as well as they have their own items these are very very simple though and as you can see will go into the item I am block it literally with one line parent so that’s the thing it’s basically this item model is just completely based off of the Block model itself so create a new on to text file paste it in there change this to tutorial underscore tutorial Mars : block slash tutorial block give this a save pasted it into and save it in the models item call it tutorial block tops of Jason and there we are we have our Item model crater as well finally we’re going to need to create a textures blocks texture stop block sorry go into paint.net if you downloaded the default textures from last episode and then you can just look inside of the default textures and if not there’s a link them In the description or you can just create your own 16 by 16 texture for plain blocks like ours and the texture will be put on every single side of the block but there are ways of doing it so that you can have different textures on each side and I’ll be showing them in Future tutorials or you can just look it up so I’m going to open up the iron block texture here and I’m going to fill it with the orange overlay and then going to save it so once you’ve created text sure you can save it in your mod file inside of textures block And then name it to tutorial block dot PNG close your editor and refresh everything and then we’re going to have to run the game again from our special file unless as I repeat from every other tutorial and you are running in a newer version in which case this issue shall Be fixed but you can run run client dub at boot into the game and love entirely miscellaneous scroll down we’d have the block here tutorial block and tutorial item so if it’s named correctly and it shows up good in your hand place it down to make sure it works inside of the game As well as you can see everything is working as is intended to so that’s great and thank you for watching this tutorial guys if you have enjoyed it please leave like down below and subscribe for more mine has been hairy and goodbye Video Information
This video, titled ‘Minecraft Modding Tutorial for MC 1.14/1.14.3 – Basic Blocks’, was uploaded by Harry Talks on 2019-03-10 14:57:40. It has garnered 16036 views and 378 likes. The duration of the video is 00:13:10 or 790 seconds.
In today’s episode, we create our first block.
Basic Java Tutorials: http://tiny.cc/JavaTuts Default Textures: http://tiny.cc/DefaultTextures LangToJSon convertor: https://tterrag.com/lang2json/ GitHub: http://tiny.cc/HarryGitHub Discord: https://discordapp.com/invite/xwg8zQJ