This is Minecraft and this is also Minecraft and this is what we’ll be making today hello young scratchers welcome to another scratch tutorial today we’ll be making Minecraft now obviously this won’t be as good as the real m inecraft but this is scratch so let’s get straight into It first let’s start by renaming the cat to blocks now this Sprite is not actually a block it’s a cat so let’s replace it with our Minecraft block let’s go into the costume editor and delete the second costume I’ll also delete the contents inside of the First costume and let’s upload our Minecraft Block you can find the link in the description I’ll press open and now you’ll see we have a block in the scratch editor now the size is specifically 32 pixels x 32 that will be useful later on for now let’s just delete the First costume and rename this To Grass next we have to delve into World Generation so let’s go back to the code the size of scratch a stage is 480 pixels by 360 pixels so if we were to divide 480 by 32 which is the size of the Minecraft block we could fit ax proximately 15 blocks on the Screen now how about height 360 is currently the height of our stage so let’s divide that by 32 and we get 11.25 we actually can’t have a quarter of the block on the screen so we’ll have to round that down to 10 finally let’s get to placing blocks on the screen Let’s click on the extensions Tab and click on pen the block we’ll be using is called stamp which will place another copy of the block on the screen but we can’t move it this other block called Erase will erase the Clone off of the screen we can use these two blocks to Create blocks on the screen all right let’s go to control and drag out repeat 10 I’ll change it to 15 then let’s go to motion and drag out change X by 10 I’ll change this to 32 which is the width of the block then let’s put stamp before it And when we press it you’ll see we create a line of grass if we were to try to press it again we wouldn’t see anything let’s clear the screen before and then when we press it you’ll see that nothing appears except this grass block we have to reset the position when we’re Done I’ll set it to minus 225 on the xaxis and minus 165 on the Y now the whole bottom of the screen will be grass blocks great we have successfully made Minecraft well not yet the next thing thing we’ll need to do is start by filling up the vertical space of the Screen with more grass blocks let’s drag out another repeat 10 and this time we’ll put it over the repeat 15 then we’ll put a change y by 32 the height of the block outside of repeat 15 we’ll also reset the Y to – 225 outside of the Loop What’s Happening Here is that we’re creating a row of blocks on the bottom we change y by 32 which moves the blocks up and then we create another row of blocks we repeat this 10 times which we will reach the top and you’ll see we Have this little grass block here we can easily fix this by first showing the block before we stamp it and then hiding it after now the annoying flickering at the edge of the screen will go away so that’s our first step we had successfully filled up the screen with grass Blocks next let’s get into making hills and mountains currently we’re filling up the screen by starting at the left side and moving to the right and creating a whole whole new row to create variations on the vertical axis of the block let’s switch the rows instead of change X by 32 inside of the loop let’s put it outside and put the change y by 32 inside of repeat 15 then set X to- 225 will be replaced by set y to – 165 this way we start at the bottom left and we move up then we move on to the Next row and then we create another block moving up you can see this happening on the screen and it just stopped short there and that’s because I need to set this to repeat 15 and then repeat 10 so now what now we have to choose a random value to Move up and then once we get to the random value we move on to the next row this way each block will have their own Heights let’s quickly find The Operators Tab and the block we’re looking for is pick random 1 to 10 I’ll snap this in Repeat 10 and I’ll change this to pick random 5 to 10 let’s run this block and you’ll see each row has its own vertical value that’s because we replace 10 with pick random 5 to 10 which will pick a random value from 5 to simple am I right To fix the drawing effect where a mountain will just appear out of nowhere let’s first delete the my variable variable and this variable will determine how far the mountains will be spaced apart I’ll call this world frequency also make sure for all Sprites is checked then let’s press okay and Make a new variable and I’ll call this world amplitude this will determine how high the mountains go let’s set World amplitude and I’ll set this to a default value of five and also I’ll set World frequency to three I also forgot to make a new variable called Sign and make sure it’s for this Sprite only let’s press okay now after we change y by 32 let’s also change sign by one and then instead of pick random 5 to 10 let’s set this to S of sign I’m going to go to The Operators Tab and then I’m going to drag Out a multiply block here is where we can Define our world frequency we multiply sign by World frequency and then after that we inrease the whole thing in a multiply block again and this time we’ll multiply it by World amplitude in a sine wave frequency will determine How close the waves are together and amplitude will determine how high the waves go let’s also make a new variable called World offset Y which will determine how far the ground goes up I’ll add this on to all of that mess right there and at the end let’s just Put World offset y I know it looks like a mess but I just I think I explained it well okay let’s attach this to repeat 10 that’s a monstrosity and also let’s set World offset y to five let’s click that code to run it and then let’s run the Second code and now you’ll see we have an awesome sine wave effect on our ground I’ll move these variables to the bottom just so you can see the effect all right we have the basics down for our Minecraft World Generation let’s go and click on the my blocks category and Click on create a block I think I’ll call this create world and let’s also press run without screen refresh just so the code run really fast okay let’s drag all the code we’ve created and put it under create world and now let’s drag out when green flag clicked set all the variables to The default values and then let’s click on my blocks and create world and so I’m pressing the green flag and nothing is happening sign right now is 82 I forgot to set sign to zero when we created the world so let’s press the green flag and yes that’s works now let’s go to Operators and drag out pick random 1 to 10 I’ll put this in change sign by and now we should have a random World each time we press create world and the reason that the whole screen is not feeling is because we need to mess with the world frequency and World amplitude Values so I’ll just change this and now it’s working okay so that’s pretty much it for this tutorial all you have to do is find a good combination of numbers you like you can have a world that’s really mountainy and a world that it’s kind of Flat and if you change the world offset y that will change how high the ground is from the bottom of the screen so just keep that as something low so you have more space to build so my final values for the frequency I had one for the Amplitude I had three and for the world offset y I had five also make sure to hide the variables that we created just so you can see more of the world and before we end the tutorial let’s end it by creating a sky background so I’ll Just do a choose a blue color for the sky and make sure to press convert to bit map so you can fill in the backgrounds and that’s it thanks for watching this tutorial and I’ll see you in the next one make sure to subscribe and like the video for More Video Information
This video, titled ‘How to make Minecraft in Scratch – Episode 1’, was uploaded by Jackson Academy on 2023-12-11 16:10:35. It has garnered 5379 views and 187 likes. The duration of the video is 00:09:28 or 568 seconds.
Get the full course: https://www.udemy.com/course/ultimate-scratch/
In this Scratch 3.0 Tutorial, we will explore stamping, world generation, and using Sin and Cos waves to create natural hills and mountains. In episode 2, we will cover checking if we can place or mine blocks, and in Episode 3, we will actually get to placing blocks. This minecraft series is literally teaching you how to make minecraft in less than an hour, so make sure to stay tuned for more tutorials like these by smashing that subscribe and like button!
Get the assets at https://www.sulaimanjackson.com/courses
Make sure to subscribe and turn on notifications so you get notified when we release a new video! 00:00 Introduction🤔 00:18 Getting started 00:36 Setting up 01:01 Adding Mineraft Block 01:21 Pixel stuff 02:11 Making bottom row of Blocks 04:42 Making terrain randomation? 05:22 Using the Sin block to make smooth terrain 07:31 Custom Setup Block 07:53 Resetting the Variable to stop bugs 08:15 Adding random heights to world generation 🤣 08:58 Adding sky backgrounx ☺