Jump to content

Recommended Posts

Posted

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:

 

Posted

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)

fIMDdvq.jpg

Posted

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.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.