Make An Empty World

Discussion in 'Plugin Development' started by Evonoucono, Jan 1, 2016.

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

    Evonoucono

    I am trying to create a completely empty world without blocks but currently I am just making a flat world and deleting a whole ton of blocks which lags/crashes the server. Is there any special way of making an empty world? Current code:
    Code:
                            WorldCreator world = new WorldCreator(args[1]);
                            world.environment(Environment.NORMAL);
                            world.generateStructures(false);
                            world.type(WorldType.FLAT);
                            Bukkit.getServer().createWorld(world);
    
                            for (int y = 0; y <= 5; y++){
                                for (int x = - 500; x <= 500; x++){
                                    for (int z = - 500; z <= 500; z++){
                                        Location loc = new Location(Bukkit.getWorld(args[1]), x, y, z);
                                        loc.getBlock().setType(Material.AIR);
                                    }
                                }
                            }
     
  2. Offline

    BlueCraftMC

    i don't know if you can make a world with no blocks or structures, i meant theres too many blocks to get rid. Maybe you can make a void world, but i don't know. If its possible, you may want to set the world to not spawn any mobs.
     
  3. Offline

    Zombie_Striker

    @Evonoucono
    Look into chunk generators. You can make a chunk generator that does not contain any blocks in it, and when the world tries to create a new chunk, replace it's chunk generator with the "empty" chunk generator.
     
  4. Offline

    Evonoucono

    I looked into it and (from what I've found) in order to alter the way chunks load you have to register the worlds you want altered in the plugin.yml, however I do not have pre-defined world names. I am creating worlds with names given from commands. Is there any other way of doing this, or am I looking at this wrong?
     
  5. Offline

    timtower Administrator Administrator Moderator

    @Evonoucono World creators like MultiVerse take generators as arguments, they save that generator themselves. Requires a new world though.
     
  6. Offline

    mcdorli

    World creators are very easy to create in spigot. Try to look into that. The spigot javadoc is especially helpful in this situation.
     
Thread Status:
Not open for further replies.

Share This Page