IBC mock talk to your number microphone tutoring and teach you how to add your very own button to the game so before you do this tutorial I recommend that you check out the last tutorial on custom sounds the reason for that is because we added the sound for the fence Gate and also we’re going to be using a sound today so you need to sell pure sound handler so check out that video yeah so straight into it we’re gonna make our block that extends block button and that’s going to make us want to add some classes that’s going to Make us wanna add some methods which is fine is it would know it isn’t would and like most of our blocks need to put in the local eyes name and then list a set on low first name and localized name this set registry name new resource and That’s all about basic stuff set up for this so all we need to do is get to click sound and release sound but there’s another method that we can in fact over our a tick rate method which for would well if we just take a look at A super for wooden ones it’s 30 ticks and then for stone ones is 20 ticks I’m going to put it to 15 so it’s gonna be shorter zam a stone button tick now that’s practically the Tim button done but we’re gonna hit it over to a handlers and to our sound handler gonna Add the sound so public and like so now what we’re going to do is in a init class in a mod blocks we need to make our block here so it’s a public static block and tin button we’re gonna just do ten button equals a new block tin button and where is it Tim button I think this is protected yeah we wanted to be the public here I’m not protected get me to do that and it’s gonna put the localized name of tin on the button we are going to register it like a normal block so that’s just register block and that’s just tin Button and say would have render we’re gonna just need to register the render for this so register render tin button and like so we put us done so before we can actually load the game I need to actually play the sound so play the click sound so play sound so World up play sound the player the position be resound handler dot and this is click on category is sound category dot blocks the volume is 1.0 and it’s the same for the pitch and we can just copy and paste this for the release sound but just change it to button click Off now for the release sound that doesn’t need to be a player so what we’re going to do is cast it to an entity player and just gonna put milk and like so that should all work ok so the game is loaded up so if you go Inside of our test world we should be able to now try out a button with redstone so let’s go grab our button from our creative tap we need to name it so let’s just go to my language file so we can now place the button on the floor And you can hear the sound and if you go grab ourselves some redstone we should be able to see that it doesn’t last too long so let’s do a comparison to the other buttons so let’s just get this here and redstone that lasts a long time So thank you guys for watching and like comment and subscribe I am out Video Information
This video, titled ‘Minecraft Modding Tutorial | Custom Button (1.10.2,1.11.2)’, was uploaded by CJMinecraft on 2017-02-09 17:30:01. It has garnered 1786 views and 20 likes. The duration of the video is 00:05:45 or 345 seconds.
Today we add our own custom button!
Files – https://goo.gl/x5fhdK
Please support me if you can – https://www.patreon.com/cjminecraft Discord – https://discord.gg/ZvhUKkd
Don’t forget to like, comment and subscribe!
Music by Ninety9Lives Elektronomia – Imagination Video Link: http://99l.tv/Imagination Channel: http://99l.tv/Subscribe Album Download Link: http://99l.tv/GoldenGun
Links: ►GitHub – https://goo.gl/c4JlXe ►My Website – http://cjminecraft.theclever.me/ ►Modding Tutorial Playlist – https://goo.gl/bq6sgx ►Facebook – https://www.facebook.com/CJMinecraft01/ ►Google Plus – https://goo.gl/3n1umj ►SoundCloud – https://soundcloud.com/speed2-pc/ ►MCAmino – http://goo.gl/LzwZ9W ►Votable – http://www.votable.com/CJMinecraft
For modding help or if you want to contact me, email me at [email protected]
My Schedule: Monday or Thursday: ►Modding Tutorial