Allow custom biomes to "replace" vanilla biomes.
goosewoman opened this issue ยท 8 comments
What I'm suggesting is giving a biome the config option to replace/patch/override a vanilla biome.
I want to use IslandCraft together with TerrainControl
To quote the islandcraft developer:
IslandCraft does some NMS stuff to replace the code which decides which biomes go where. This step is done before the rest of the terrain generation. If another plugin uses Bukkit's terrain generator API it will be passed the biome information created by IslandCraft. If it uses this information to both shape the terrain and populate it then it will work well with IslandCraft. The vanilla terrain generator does use this biome information, which is how IslandCraft usually works.
This means it only works with vanilla biomes. Meaning it would require the vanilla biomes to be patched (replaced in BiomeBase with class that extends BiomeBase with reflection) to make TerrainControl work with them, or have no custom biomes at all.
So I would say something like ReplacedBiome: DESERT and my biome would replace the desert biome,
Right now with BiomeMode set to Default I get this:
http://i.imgur.com/uO2NnKm.png
instead I want it to look like this (but with my own custom stuff)
http://i.imgur.com/QXkJCUz.png
As you can see in the first screenshot the biomes are all handled by islandcraft in a neat square distribution, but it doesn't work with TerrainControl because TerrainControl is separate from the vanilla biomes. It can only override biomes when biomemode is set to normal.
Basically I want the option to have biomes override vanilla biomes (default to off), so that it might allow for compatibility with IslandCraft.
PS: I know little about the internals of TerrainControl or IslandCraft, so please excuse me if I got anything wrong.
tagging @hoqhuuep to correct me if I'm wrong about this resolving compatibility problems with islandcraft.
Hey! Thanks for the suggestion! Support for terrain control biomes has been on my TODO list for a long time... In fact, the first released version for IslandCraft required TerrainControl, but I would be very surprised if that worked with any recent MC version.
Rather than using replaced biomes as you suggest, I would prefer to be able to write the names of the custom TerrainControl biomes in the IslandCraft configuration and also have a "useTerrainControl" setting or something similar.
I'd love to get this support implemented, but it's unlikely I'll get time to look into it until at least Christmas. If anyone reading this thinks they could implement it, I'm always happy for PR's ;-)
Here's a couple links to the old code, I don't know if the TerrainControl APIs are still similar:
By default, TerrainControl also replaces the biome generator, so there's going to be a conflict.
@kukelekuuk00 When setting BiomeMode
to Default
, TerrainControl doesn't mess with the biome generator. Theoretically, you should then be able to use the IslandWorld biome generator. However, no custom biomes of TerrainControl are spawned.
@hoqhuuep The TerrainControl APIs are still very similar. From this class you'll need to remove the getTemperatures, getBiome and cleanupCache methods and remove the BiomeCache parameter from the constructor. Also some classes in TC have been moved to another package, but their name is still the same. Registering your biome manager should also still work in the same way.
@rutgerkok What about a biomemode "override"? It's basically the default biomegen, but with vanilla biomes being overridden by terraincontrol.
@kukelekuuk00 Sounds a little hackish, so I'd prefer not to add this.
When using BiomeMode:Default TerrainControl already allows you to change the look of the default biomes, so you can customize them to look like custom biomes.
@rutgerkok I'm not sure what you mean with "change the look of default biomes". I don't believe I quite understand how biomemode: default works. I thought it was just making the biome distribution vanilla, but it still generated terrain according to the custom biome distribution. At least, that's what I gathered from some messing around with biomemodes. Is that wrong?
@kukelekuuk00
The terrain generator needs to decide where to place a biome, and how that biome looks. Somewhere it is defined that beaches spawn between most biomes and oceans (the place of the biome), and somewhere else it is defined that beaches have sand and no trees, grass and flowers (how the biome lookds).
When using BiomeMode:Default, TerrainControl uses the biome locations of vanilla, but the biome looks as specified in the settings.
@rutgerkok Then why doesn't islandcraft work when biomemode is set to default? It should be overriding default biome placement, thus should terraincontrol generate terrain to go with that biome placement, shouldn't it? Unless islandcraft isn't hooking in early enough and terraincontrol does the terraingen before islandcraft can change the biome?