A youtube and welcome to another episode of modding tutorials and in this episode in to be another part of the advanced block series and then this episode I’m going to show you how to make a block that makes you bounce up when you walk over it so obviously the first thing We’ve got going to want to do in a mod underscore class is make a new block so public static final oops check out my getting started series if you don’t know what I’m doing here it shows you how to make a basic block so public static final block we’re going to call it Bouncy equals new block and then we will make a new class in the second chord block vamps and then that is going to take one parameter of the ID which will set to 150 and then we also want to set the name to the block name so dot wanna Set block name like so yeah how about so that space kissing Holbrook and we’ll put the usual methods in so modloader a dot red just register block I should have a capital R on it and we want modloader dots odd name I don’t see and finally we just want to Make a quick recipe modloader dots and shapeless recipe also check out my getting started series if you want to know how to make a new recipe as well bouncy commerce base64 so we’ll just make a recipe that makes 64 bouncy box if you give it one block dirt oops Look doctor and that needs a capital s right now what we want to do is if we just go over this and Eclipse and create Crete class block bouncy it will create a new class automatic you with that name or you can just right-click at the side And click new class and then name it so this wants to extend block and then you’ll get an error here and you just want to add the constructor as a the block class requires a constructor and we can take out material and set it to material dots sand like so and then to Make it bouncy so that’s basically just hard to make a simple block to make a bouncy we want to make a new method which is going to be a void method and it’s going to be called on entity walking and then if the variables it will take is world world then an integer Of X an integer of why and sorry integer of Y and an integer of Z and then the final one is an entity I want to call it entity then now you can see we have no errors if we type at override the top we should have no errors as this method on Entity walking is within the block class as long as you have all these parameters exactly the same all these variables the same as what I’ve got them then you shouldn’t get any errors then you want entity so you want this whatever you called that on the entity object so Entity dots motion y which is the open down motion and then you want to plus equals a number so for example 2.0 and you should have a space in between them sorry so basically what this is saying is when the entity is walking over this block the motion why of that Entity will be it be increased by 2.0 so basically the motion why is that opened down so it will be increased by two point oh so you jump 2.0 then think 2.0 D doesn’t really matter we can make this as high or as low as we want so if we Set it to 1 point 0 for example and save that then quickly run it into book mode and I’ll just stretch this out of it for you and then grab our block which is here magic is already 0 now you can see if we go on it we bounce up about 5 10 Blocks I don’t really know week actually test how many is so 3 4 5 yeah about five blocks now if we made it to point o obviously it would go up to 10 blocks or if we made it something stupid like 100 point Oh as you can see it sends you Very very high and we can’t actually see the ground over when we come back down eventually due to do as you can see everything’s orange does the Sun is setting which looks pretty cool obviously and as you can tell this is sent me up about I think it’s about 500 blocks mm-hmm Anytime soon you will start seeing the floor hopefully come on at the moment I can see stars in a little bit of orange maybe that’s a little too much yeah I wouldn’t suggest setting it to that a presume I’m moving down oh there we go Here’s the floor and there is my block I wouldn’t suggest doing it that high maybe some it more like 10 would be a bit more easy to manage so if we go up 10 as you see it sends you pretty high but we can still just about see the Floor down here obviously when you fall you will take damage but I’m in creative mode at the moment and if I was you I wouldn’t try this but if we make it minus equals 10 means we’re going to go down it should mean we’re going to go down apparently not hmm Doesn’t seem to really be doing anything I think it’s yeah or if we were two sets entity dots let’s see here is clad it horizontally equals false maybe or not doesn’t really seem to be doing anything nevermind obviously if you want to make it do other things you can just Look through this list and change it to do things when you go on that block so we can make it kill you so we could do that so when you walk on it you spaz out for some reason hmm okay i didn’t really work okay then seems to kind of make things Go weird okay I wouldn’t try doing that some reason it puts me in to fly mode um thoughts hmm um you could change any of these two anything really drop item block dots the stop block ID comma space 1 let me see what this does so if i have a dirt block In my inventory nice dirt and I walk on this block it seems yeah that worked so if I walk on this block now you can see it drops a dirt block so yeah kind of a dispensary kind of thing that’s kind of weird anyway um thanks for watching guys I hope you enjoyed That tutorial I hope that helps with your months in the next tutorial we’ll be looking at the basic things so for example dots set resistance things like that so thanks for watching guys follow me on twitter if you want to keep updated and and check out my months Thanks for watching I hope you enjoyed this tutorial and I will see you in my next video Video Information
This video, titled ‘Minecraft | Modding Tutorial | Advanced Block Series | Bouncy Block | Ep.2’, was uploaded by HowNot2Code on 2012-02-28 20:36:27. It has garnered 854 views and 8 likes. The duration of the video is 00:11:00 or 660 seconds.
This tutorial will show you how to make a block that bounces you up when you walk on it! Ill get into the more intresting tuts once i have got the basics over and done with 😛
Download ModLoader :
http://www.minecraftforum.net/topic/75440-v181-risugamis-mods-everything-updated/
Download MCP :
http://mcp.ocean-labs.de/index.php/MCP_Releases
Download elcipse :
http://www.eclipse.org/downloads/
Follow me on twitter for updates :
https://twitter.com/#!/HowNot2Play