Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.11] What was BiomeGenBase replaced with?


Awesome_Spider
 Share

Recommended Posts

I am updating a mod from 1.7.10 to 1.11, and I have a quick question. This line in the mod is tripping me up:

BiomeGenBase[] biomeArray = BiomeGenBase.getBiomeGenArray();

 

Was BiomeGenBase replaced with Biome or something else? That's what I thought, but there isn't a getBiomeGenArray or something similar method in it.What would I use instead? I found that there was a Biomes class that had all the vanilla biomes, and it crossed my mind that I could put all these into an array. But that wouldn't work if there was modded biomes. Any help is appreciated.

Link to comment
Share on other sites

Well, looking up what BiomeGenBase#getBiomeGenArray did, it returns an array of all biomes, indexed by biome id.
I believe there is a simpler way of doing it, but cannot remember what it was, but in any case, you should be able to iterate over the REGISTRY field in the Biome class or, simpler,  just call Biome#getBiomeForId, from 0 through 255 (max value in the underlying IntIdentityHashBiMap) and add each non-null biomes to your own array.

  • Like 1

Also previously known as eAndPi.

"Pi, is there a station coming up where we can board your train of thought?" -Kronnn

Published Mods: Underworld

Handy links: Vic_'s Forge events Own WIP Tutorials.

Link to comment
Share on other sites

The Biome REGISTRY field would be better, probably.

  • Like 1

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

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
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.

 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.