I want to create a world via WorldCreator, but with no strondholds (most importantly) and no monuments. Code (Java): worldCreator = new WorldCreator(config.getString("game-settings.game-world")); worldCreator.generatorSettings("{\"useStrongholds\":false,\"useMonuments\":false}"); worldCreator.environment(World.Environment.NORMAL); This generates a world without errors but there is still a stronghold, anyone know why this isn't working? Generation log: https://pastebin.com/RnKcmpUc
Hello, no idea I suggest you to create your solo world by personalizing it and thus canceling the appearances. Then import the map with a plugin (mutliworld, multiverse) I hope I would have helped you.
You have not helped me at all, this code will be repeated multiple times over and it needs to generate a unique world each time, one without strongholds and momuments...
I don't think that what you are trying to do is possible! see WorldCreator There are no options for specific 'structures'. I think that your only reasonable choice is to generate several worlds in an earlier server version (Before Pillagers), upgrade the 'worlds', and randomly switch between them. Or, use an 'earlier' server version for the server and use ViaVersion, or whatever. Alternatively, deny all Pillager spawning?
You can disable the structure generation (https://hub.spigotmc.org/javadocs/spigot/org/bukkit/WorldCreator.html#generateStructures-boolean-) or you could check out this post and use the correct former for the method generatorSettings(string): https://www.spigotmc.org/threads/creating-worlds-with-generator-settings.393905/
I would still like to keep structures if possible though. Anyways reading through that thread and the linked thread within it, it just says "Use proper JSON" Which I am, I don't get any errors on world creation or anything.
Make sure that the world doesn't exist on the disk before using this method, as mentioned on the page: If the world already exists, it will be loaded from disk and some options may be ignored.
I have been doing that already Code (Java): deleteWorlds(); gameWorld = worldCreator.createWorld(); netherWorld = netherCreator.createWorld(); endWorld = endCreator.createWorld(); Code (Java): public void deleteWorlds() { gameWorld = Bukkit.getWorld(gameWorldName); if (gameWorld != null) { Bukkit.unloadWorld(gameWorld, false); deleteDir(worldFolder); } netherWorld = Bukkit.getWorld(netherWorldName); if (netherWorld != null) { Bukkit.unloadWorld(netherWorld, false); deleteDir(netherFolder); } endWorld = Bukkit.getWorld(endWorldName); if (endWorld != null) { Bukkit.unloadWorld(endWorld, false); deleteDir(endFolder); } } public void deleteDir(File file) { File[] contents = file.listFiles(); if (contents != null) { for (File f : contents) { if (!Files.isSymbolicLink(f.toPath())) { deleteDir(f); } } } file.delete(); }
Is it working though? Check in to make sure that the folders are completely deleted cause I remember having a hard time really deleting a world folder. Try with manually deleting the world folder to see if there is any stronghold
Yes... I am sure it deletes. I have checked all that and is genuinely a new world everytime. The reason you probably had issues is cause you deleted the main world specified in the server.properties which is an issue I had before but no longer have cause I use other worlds
Removing / preventing the generation of strongholds and monuments is not possible, with out using nms. Since the funktion to customize your world was removed in 1.13.