World Biomes

Discussion in 'Plugin Development' started by girardcome, May 24, 2019.

Thread Status:
Not open for further replies.
  1. Offline


    Hello everyone,

    I wanted to ask you if you could help me in my research on the biomes on my server.

    I have a pretty good level of programming on Java (handy for creating plugins!), But I looked and searched everywhere on the forums and documentation to know "how to remove the OCEAN biome" in the world of my server.

    Indeed, the versions of minecraft change, the APIs also, TerrainControl is not updated since 2013.

    my server is currently in 1.14.1 and I can not find any plugin to remove the OCEAN biome, nor even codes explaining how to remove this biome.

    So if you have links, suggestions, code tips (with explanations, I do not want to copy / paste codes because we learn nothing if you explain nothing), I am interested in any information you can provide me .

    Thank you all.
  2. Offline


    How about replacing all water with dirt? ^_^
  3. Offline


    Some Idea I came with is checking when a chunk is loaded if there's water in the area, if yes replace it with.. whatever you like. I don't think you can remove / replace all the water in the world at once without crashing the server.
    KarimAKL likes this.
  4. Offline


    Here's something I recently found:
    1. String path = "net.minecraft.server." + Bukkit.getServer().getClass().getPackage().getName().replace(".", ",").split(",")[3];
    2. Class clazz = Class.forName(path + ".BiomeBase");
    4. Field pField = clazz.getDeclaredField("PLAINS"); //Replace biomes with plains
    5. pField.setAccessible(true);
    6. Object plains = pField.get(null);
    8. Field bField = clazz.getDeclaredField("biomes");
    9. bField.setAccessible(true);
    10. Object[] biomes = (Object[]) bField.get(null);
    12. for(int i = 0; i < biomes.length; i++){
    13. if(biomes[I] instanceof BiomeOcean || biomes[I] instanceof BiomeRiver || biomes[I] instanceof BiomeBeach) {
    14. //Biomes you wish to replace
    15. biomes[I] = plains;
    16. }
    17. }
    18. bField.set(null, biomes);[/I][/I][/I][/I]

    Its 1.8 code but I guess it will work in 1.14 in a similar way.
    Thanks to GERVobis: original video
    Last edited: Jun 18, 2019
    KarimAKL likes this.
Thread Status:
Not open for further replies.

Share This Page