Posted August 2, 20169 yr I started modding recently because I got tired of being too lazy to work on coding. It's pretty fun. I have some questions about editing the terrain however. I most likely don't need code, I really just need the classes and methods that I should be using. I am trying to, for fun, make it so that AFTER the chunk is fully generated, it will sort each column of blocks in alphabetical order. That's fine, and I've got it, but the problem is that I am using "registerWorldGenerator", which is fine for ore generation I suppose (Obviously this is where I found it), but it's not good for me as parts of trees and villages and other structures sometimes remain unsorted. Obviously this is because the sorting takes place before. Any ideas for this? I see a "wait" method, is this what I should add? Is there a better way of running code upon a chunk finishing generation? Oh, and while I'm here, my first mod I made modified earthen blocks to be flammable, but that was somewhat messy. Is there any way to iterate through Blocks to perform something on every block? Thanks. c:
August 2, 20169 yr There is a way to iterate through blocks there is a blockRegistry in the Block class. And try making your world generator have less weight. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
August 2, 20169 yr Did that work? VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
August 2, 20169 yr Yes the Higher it is the later it will generate. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
August 2, 20169 yr How big did you make it? VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
August 2, 20169 yr Author Maybe I didn't give enough info. This problem only occurs when I move through the world resulting in new chunks generating, but the initial chunks generated are perfect. Only sometimes too. Trees on the borders of chunks get split between sorted and unsorted. Some chunks work fine, others not so fine. I made it have a weight of 5. Here's a picture of what happens. Most of these trees are stone. However, it seems that especially when the computer is running a bit slower due to generating new chunks, it fragments like this. (Worse when I run slower)
August 2, 20169 yr Try raising it even higher, and well lag is not something you can make easier unless you optimize your generation code. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
August 2, 20169 yr Author It just can't be solved with a weight of 50. Oh well, I'll figure something out. Thanks for the help. But if you do think of anything I'll check it out.
August 2, 20169 yr Can I see your generation code? It may help me. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
August 2, 20169 yr Author Sure thing. I'll set it to "Never expire" because it's their fault for having that option and I hate the feeling of finding a really old help thread with my problem, but all of the links expired. http://pastebin.com/uxJuAjZX
August 2, 20169 yr You could try looking into the terrrainGen events, like Maybe OreGenEvent.Post, PopulateChunkEvent.Post, Possibly even ChunkGeneratorEvent(don't really think this will work). VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
August 2, 20169 yr May I ask why you are doing this? Because it seems kinda "random". VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
August 2, 20169 yr Author Just to get experience. I got the idea from here. https://xkcd.com/861/ It's not the same, but it inspired the idea. Uh, how do I get an IChunkProvider for this? PopulateChunkEvent.Post contains everything I need except that.
August 2, 20169 yr This what you want. event.getWorld().getChunkProvider(); VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
August 2, 20169 yr Author Ah yes. Thanks. It didn't work, on account of "The server is running a bit behind!". This will be a project for when I get a lot better. Thanks for the help, I'll find something else to do. I've exhausted the fun of this project.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.