Jump to content

[1.14.x] How to generate multiple biomes in custom world type.


Stanlyhalo

Recommended Posts

So I have made my own World Type, and the tutorial I followed on this process used SingleBiomeProviderSettings. And I want to use both of my custom biomes. How do I do so?

 

@Override
public ChunkGenerator<?> createChunkGenerator(World world)
{
	OverworldGenSettings settings = new OverworldGenSettings();
	SingleBiomeProviderSettings single = new SingleBiomeProviderSettings();
	single.setBiome(CustomBiomes.biome_custom1);
	single.setBiome(CustomBiomes.biome_custom2);
	return new OverworldChunkGenerator(world, new SingleBiomeProvider(single), settings);
}

I want to know if their is a BiomeProviderSettings for multiple biomes, and how do I do it.

Edited by Stanlyhalo
Link to comment
Share on other sites

14 minutes ago, Stanlyhalo said:

I want to know if their is a BiomeProviderSettings for multiple biomes, and how do I do it.

There is one, but it is for the Overworld specifically take a look at OverworldBiomeProviderSettings and OverworldBiomeProvider. You can also use your IDE to figure these things out. If you right click on a Class name and Click Open Type Hierarchy in eclipse it will show you the parent classes and child classes in a hierarchy.

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.

Link to comment
Share on other sites

I've now done this with OverworldBiomeProviderSettings:

OverworldGenSettings settings = new OverworldGenSettings();
OverworldBiomeProviderSettings BiomeProvider = new OverworldBiomeProviderSettings();
BiomeProvider.setGeneratorSettings(settings);
return new OverworldChunkGenerator(world, new OverworldBiomeProvider(BiomeProvider), settings);

But I don't know how to add my biomes to the provider.

Link to comment
Share on other sites

1 hour ago, Stanlyhalo said:

But I don't know how to add my biomes to the provider.

You'll probably need to make your own.

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.

Link to comment
Share on other sites

32 minutes ago, Stanlyhalo said:

Are you able to point me in the direction for either find an example, or docs,

You can take a look at any mod that is open source that adds their own WorldType I think Biomes O'plenty does this? If not take a look at the vanilla one for the Overworld.

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.

Link to comment
Share on other sites

I know how to check the code through the IDE, but how would I check the vanilla code for WorldType?

 

Edit*: Biomes O Plenty doesn't support 1.14.4 so maybe I would have to translate the code to 1.14.4 if I can see the code.

 

Edit*: I can see the .class files but disecting this can take a bit.

Edited by Stanlyhalo
Link to comment
Share on other sites

4 minutes ago, Stanlyhalo said:

Edit*: Biomes O Plenty doesn't support 1.14.4 so maybe I would have to translate the code to 1.14.4 if I can see the code.

Ummm no. You could wait to see when they update.

 

5 minutes ago, Stanlyhalo said:

but how would I check the vanilla code for WorldType?

You would need to look for it. You could type WorldType and ctrl+left click it.

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.

Link to comment
Share on other sites

13 minutes ago, Stanlyhalo said:

What if I just instead created my own ProviderSettings to try and support different Biomes?

That's what I've been saying you need your own BiomeProviderSettings and potentially BiomeProvider.

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.

Link to comment
Share on other sites

Yup I am currently doing it, and this is what I have so far on my settings:

   private Biome[] biomes;

   public ExpansionModBiomeProviderSettings addBiome(Biome[] biomeIn) {
	  biomes = new Biome[biomeIn.length];
	  for (int i = 0; i < biomeIn.length; i++)
	  {
		  biomes[i] = biomeIn[i];
	  }
      return this;
   }

   public Biome[] getBiome() {
      return this.biomes;
   }

Also how would I call addBiome from my WorldType, because it is underlined in red.

 

Edit*: I'm trying to make it so that the WorldType adds a biome list and the biome provider settings will make it a list so that the provider can read one at a time if that's possible.

Edited by Stanlyhalo
Link to comment
Share on other sites

So I just tried instead of:

return new OverworldChunkGenerator(world, new SingleBiomeProvider(provider), settings);

I can do:

return new OverworldChunkGenerator(world, new BiomeProvider(provider), settings);

So how could I possibly make it instead of:

SingleBiomeProviderSettings provider = new SingleBiomeProviderSettings();

Into just BiomeProviderSettings because I am trying different combos and trying to ctrl+click to open it.

 

Edit*: Figured it out:

OverworldBiomeProviderSettings

But idk how to add a biome, also how would I do nether & end (maybe answer this after how to add a biome to the OverworldBiomeProviderSettings)?

Edited by Stanlyhalo
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
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.