Removing Ocean Biomes

Discussion in 'Spigot Plugin Development' started by Spedwards, Jun 15, 2016.

  1. Just about every post I've seen about removing a specific biome has been answered with two words, "Terrain Control". I don't want to get a plugin, just for this. I want to do it myself.

    I'm extremely new to terrain generation as a whole, so I'm trying to figure this out slowly. I have a few questions.

    1. Do you have to change the biome in a BlockPopulator? If not, where?
    2. When it gets changed, to do have to re-generate the chunk, or has it not been generated yet?
    3. If I have to re-generate the chunk, how can I avoid the obvious chunk borders showing?
     
  2. This is how I've removed biomes:
    Code (Java):
    Field biomesField = null;
            try{
                biomesField = BiomeBase.class.getDeclaredField("biomes");
                biomesField.setAccessible(true);
                if(biomesField.get(null) instanceof BiomeBase[]){
                    BiomeBase[] biomes = (BiomeBase[])biomesField.get(null);
                    biomes[BiomeBase.DEEP_OCEAN.id] = BiomeBase.PLAINS;
                    biomes[BiomeBase.OCEAN.id] = BiomeBase.FOREST;
                    biomes[BiomeBase.SWAMPLAND.id] = BiomeBase.FOREST;
                    biomes[BiomeBase.DESERT.id] = BiomeBase.FOREST;
                    biomes[BiomeBase.DESERT_HILLS.id] = BiomeBase.FOREST;
                    biomes[BiomeBase.PLAINS.id] = BiomeBase.FOREST;
                    biomes[BiomeBase.JUNGLE.id] = BiomeBase.FOREST;
                    biomes[BiomeBase.JUNGLE_EDGE.id] = BiomeBase.FOREST;
                    biomes[BiomeBase.JUNGLE_HILLS.id] = BiomeBase.FOREST;
                    biomes[BiomeBase.EXTREME_HILLS.id] = BiomeBase.FOREST;
                    biomes[BiomeBase.EXTREME_HILLS_PLUS.id] = BiomeBase.FOREST;
                    biomes[BiomeBase.MESA.id] = BiomeBase.FOREST;
                    biomes[BiomeBase.MESA_PLATEAU.id] = BiomeBase.FOREST;
                    biomes[BiomeBase.MESA_PLATEAU_F.id] = BiomeBase.FOREST;
                    biomes[BiomeBase.MUSHROOM_ISLAND.id] = BiomeBase.FOREST;
                    biomes[BiomeBase.MUSHROOM_SHORE.id] = BiomeBase.FOREST;
                }
            }catch(Exception e){e.printStackTrace();}
     
    Run this code before you load the world.
    Hoping that can lead you somewhere.[/CODE]
     
    • Like Like x 1