Jump to content

[1.12.1] Adding multiple custom biomes to custom world types


Recommended Posts

Posted

At the moment I can only figure out how to add one biome to my custom world type via: 

 

public class worldMediterranean extends WorldType {
  
	public worldMediterranean() {
		super("Respublica");
			
	}
	
	@Override
	public BiomeProvider getBiomeProvider(World world){
		
		
		return new BiomeProviderSingle(modBiomes.LATIUM);
		
	}	
}

 

However I cannot figure out how to make the custom world type have several biomes that are only my custom biomes. Ive looked into the GenLayer and GenLayerBiome but those classes are so confusing as to what they are exactly doing. Ive looked around the githubs of choonster, the biomeoplenty github and other to try and grasp how to do it but ive come up short. If anyone could give a straightforward method it would be appreciated.

Posted

You're confusing the biome with the biome provider. A BiomeProvider has a getBiome() method which returns the biome for a given BlockPos. However, you've used a BiomeProviderSingle which always returns the same biome. So instead you should use a general BiomeProvider and @Override the the getBiome() method to provide the biomes that you want. 

 

In other words, the WorldType provides the BiomeProvider which provides the Biome instances.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Posted
2 hours ago, daruskiy said:

When looking at BiomeProvider.getBiome it appears to be a single return value from 'Biome' so how would that be used for multiple biomes?

Right, it only returns one biome but it returns it based on the BlockPos you pass to the method. So you return different biomes based on the position.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

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.