Jump to content

[UNSOLVED][1.7.10] custom topBlock/fillerBlock in custom biome


Recommended Posts

Posted

How deep is your dimension?

Because anything below 57 (minus a semi-random value), the top block will be replaced by gravel, and the filler block by stone.

 

You can look up this behavior in

BiomeGenBase#genBiomeTerrain(...)

. You can override this by overriding

genTerrainBlocks(...)

(genBiomeTerrain is

final

) in your biome class, copying the code from the aforementioned method and change the behavior.

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Posted

How deep is your dimension?

Because anything below 57 (minus a semi-random value), the top block will be replaced by gravel, and the filler block by stone.

 

You can look up this behavior in

BiomeGenBase#genBiomeTerrain(...)

. You can override this by overriding

genTerrainBlocks(...)

(genBiomeTerrain is

final

) in your biome class, copying the code from the aforementioned method and change the behavior.

 

I suspected as such, however, the variable names in my Forge version are all obfuscated and I can't figure out exactly how to change the behavior. Maybe I'll just fool around with it until I figure it out.

Posted

I suspected as such, however, the variable names in my Forge version are all obfuscated and I can't figure out exactly how to change the behavior. Maybe I'll just fool around with it until I figure it out.

 

They are for me as well, but I have the meaning of those right here:

World p_150560_1_

- The world object

Random p_150560_2_

- The RNG of the ChunkProvider, its seed is the world seed

Block[] p_150560_3_

- The chunk block array, Its size is 16x16x256 = 65536

byte[] p_150560_4_

- the chunk block metadata array, Like

p_150560_3_

, it's 65536 fields big

int p_150560_5_

- the current block X-position

int p_150560_6_

- the current block Z-position

double p_150560_7_

-

stoneNoise

value (?)

 

But I already gave you the solution:

In your biome, override

genTerrainBlocks

, copy the code from

BiomeGenBase#genBiomeTerrain

and paste it into your overridden method. Then look at where it sets the Block array to gravel and change that line (or just remove the whole

[else if]

block).

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

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.