Jump to content

Recommended Posts

Posted

I have a custom biome already implemented and generating in the world randomly. However it is currently just a plain biome and i'm looking to add my custom tree to spawn in this biome Only. I also noticed that despite having the decorator statements as shown below i do not believe that they have any effect on the biome.

 

 

  Reveal hidden contents

 

 

Here is the BiomeGen code for my biome (includes the statements I posted above):

 

  Reveal hidden contents

 

 

And then this is the WorldGenerator class for the Tree:

 

 

  Reveal hidden contents

 

 

I'm trying to add that tree to that biome.

 

This is the WorldGen for the tree as well, however I do not think this is needed:

 

  Reveal hidden contents

 

 

Lastly this is the code implemented into my main mod class that registers my biome:

 

  Reveal hidden contents

 

 

Any help getting the tree to spawn in Only that biome would incredibly helpful. On another note I also need to know how to spawn a custom mob in only this same biome.

 

Thanks in advanced for anyone that can provide any assistance.

 

 

  • 2 weeks later...
Posted

If you still haven't figured it out (seeing as this thread is a little bit old), your problem is that you're not overriding the BiomeGenBase method:

 

public WorldGenerator getRandomWorldGenForTrees(Random random)

 

If you don't override this method, Java will just use the one in BiomeGenBase, which, I think, gives you the default tree generator.

 

You also may need to change the BiomeDecorator's treesPerChunk field, and make sure your trees can spawn on your biome's top block.

 

Certain BiomeDecorator fields only change the way the biome is decorated if certain conditions are met. For the decorator to spawn dead bushes, the top block must be sand, mushrooms only spawn in low light levels (I think), clay only spawns underwater in a biome of the top block is dirt or grass. reeds also need either dirt, grass, sand, or gravel to spawn. Lilypads need water in the biome, so the minimum height must be negative.

 

Also, there's no need to override the decorate() method from BiomeGenBase if all you're doing is calling the one in BiomeGenBase.

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.