All right it’s the moment you’ve all been waiting for the cheese shape okay so I’m not actually making a cheese shape it’s actually one of my failed attempts I had for generating terrain yes that’s right in this video I’m making another new shape to generate terrain but first I Need to make the terrain generate a shape once again it’s basically a copy of the cuboid shape in its base form and the difference being that it also has the purlins octave generator and needs a few extra checks I also added a parameter to start with to set the octave count octaves Hurlan noise already confused well don’t worry I have many more crazy was to throw at you I then needed to add some more information from the area data class to be able to generate the terrain added the size of the area to the class to easily gather that information I then Set to work creating the noise value noise simply needs the x and z coordinates then frequency and amplitude I was a little confused on what those values did but I’ll get back to that I then needed to use the noise value to get the height relative to the area size To do that though I need more information in the area data class again anyway this gets the relative distance the current location is from the bottom corner I then use that in the loop to check if the block needs to be placed finally I simply add the new terrain Shape to the list of shapes and it was good to go What generated as a result of all this work was not all good though I got these pillars I mean sure it looks interesting but doesn’t really look anything like terrain so I thought oh I need to normalize the noise data and return the value from negative 1 to positive 1 then To get a value from 0 to 1 I just need to add 1 and divide by 2 simple enough I also threw in a print statement to make sure I was getting the correct values you know debugging stuff and back to testing I went surely it look more like Terrain now right wrong it’s the cheese generator from the intro ok so the rest of this is basically a montage of me messing with frequency and amplitude values as I was saying earlier I was unsure what these values actually did so I started off by randomly setting them And testing the result the only reason I was doing this was because of how well the documentation is written for this class it simply says how much to alter the frequency by each octave that doesn’t really help I tried large values and small values and I tried other values but nothing worked I then saw the scale option and I added a parameter to easily change this in-game thinking surely this would solve my problem boy was I wrong it only seemed to make things worse I finally realized that I’d only tried large round numbers and by large I mean Values greater than one so I set the scale to a tiny 0.05 and their frequency to one I then got this beautiful looking terrain out of it finally after spending ages trying large values I found that I only needed tiny ones it would be nice if the documentation gave me some insight into This beforehand but what can you do next up I added a value limiter for the terrains parameters so only a set value range can be entered The scale you can enter for the terrain is between one and ten one making the terrain spread out super far and ten making it all bunch up for the moment the command won’t tell you the limit but if you set something too high or too low It’ll just set it to the maximum or minimum value I may implement something in the future to show you the range but I want to add a lot more info to the command so I’ll probably just add that all at once anyway terrain is pretty boring of us All one block type so I went and made in overlay shape to overlay has a single parameter so you can set the depth and has a range of one to ten blocks As for its functionality place mode places the blocks on top of existing blocks while replace and break replaces existing blocks break obviously just removes them and replace well replaces since overlay only really needs to loop over the top of the area and check downwards for blocks I only need to loop Over the x and z axis also since the loop will always start at the bottom corner first I added a way to move the current point so for overlay I move the current point up to the top of the area The overlay shape then loops downwards through the area to check if we can find any solid blocks if it does find one in the area it then proceeds to do another loop to place or replace blocks for the amounts of the depth parameter And finally I added the new overlay shape to the list of shapes and we go back into Minecraft to test it I have the perfect thing to test on the terrain I could now generate only one issue depth is 1 but the amount of blocks overlaid is too simple to fix I just Sent the wrong comparison in the loops After fixing that it works perfectly he’s a depth of one and removing a depth of one now for a depth of two And a replaced depth of three And once again we’ve reached the end of the video the terrain took a long time but I’m pretty happy with how it looks I can now turn my flat world into anything I wish if you have any ideas for any other shapes to add or have any questions Please leave a comment below also if you’ve enjoyed this video please leave a like and if you want to see more videos as they come out please subscribe to my channel I’ll now leave you with an overlay test on a sphere thanks for watching I’ll see you all later Video Information
This video, titled ‘Creating a Minecraft Bukkit Plugin #4 | Terrain?’, was uploaded by ZarrPlays on 2020-02-11 21:00:02. It has garnered 34 views and 3 likes. The duration of the video is 00:09:53 or 593 seconds.
The plugin has come quite far now, and to take it even further, I add terrain generation in this episode.
If anyone watching this is wanting to know how to use the noise generator that’s built into Bukkit, I hope I give enough insight in this video so you don’t have to go through all the suffering that I did.
This is a Minecraft Bukkit plugin I’ve been working on for 1.15. The source is available on my GitHub Repo linked below. It has quite a few shapes and features now with more to come.
Source and Download: https://github.com/Razz0991/Construkt
——————————————————————
Music Provided by Youtube’s Audio Library https://www.youtube.com/audiolibrary