How to create world void

Discussion in 'Spigot Plugin Development' started by xXEmiXx, Jun 10, 2017.

  1. Hi, I'm back, hahaha. My question is this:
    I want to create a world, empty, I understand how to create a world, but I do not know how to make it empty. This is what I get to write:

    If you speak Spanish, it is much better


    Code (Text):
        @Override
        public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){
         
            Player p = (Player)sender;
            if(cmd.getName().equalsIgnoreCase("creatoworld")){
                if(args.length == 0){
                    if(p.hasPermission("taco.use")){
                        p.sendMessage("§2§lTaco§f§lW§4§lorld §7§l>> §aModo de uso: §8§l/cw <nombre> [vacio]");
                    }else{
                        p.sendMessage("§2§lTac§f§loL§4§land §7§l>> §4No mames puto no tienes permisos");
                    }
                 
                    return true;
                 
                }
                else if(args.length == 1){
                    if(p.hasPermission("taco.cw.name")){
                        String world = args[0];
                        if(Bukkit.getWorld(world) != null){
                            Bukkit.createWorld(WorldCreator.name(world));
                                             
                            p.sendMessage("§2§lTaco§f§lW§4§lorld §7§l>> §a§lCreando mundo: §e§l" +world);
                         
                            Location l = Bukkit.getWorld(world).getSpawnLocation();
                         
                            p.teleport(l);
                         
                        }
                    }else{
                        p.sendMessage("§2§lTac§f§loL§4§land §7§l>> §4No mames puto no tienes permisos");
                    }
                }
                else if(args.length == 2){
                 
                    if(p.hasPermission("taco.cw.create")){
                        String world = args[0];
                        String v = args[1];
                        if(Bukkit.getWorld(world) != null){
                          if(args[1].equalsIgnoreCase("void")){
                              World mundo = Bukkit.createWorld(WorldCreator.name(world));
                           
                           
                          }
                         
                        }
                     
                    }
                 
                }
             
                return true;
            }
                 
            return true;
        }
     
     
  2. create a custom world generator
     
  3. How to set void?
     
  4. by just doing nothing in the generator :p
     
  5. Send code pls!
     
    • Like Like x 1
  6. I won't send you code...
    Also What you just did on the latest post is copy & paste, as i said just create a custom generator that does nothing what you have is a generator that does everything.
    Just create an empty generator, is that so hard?

    Code (Text):

    class CLASS extends ChunkGenerator {

    @Override
    public ChunkData generateChunkData(final World world, Random random, final int chunkx, final int chunkz, BiomeGrid biome) {

        ChunkData data = createChunkData(world);

    //modify biome of you want ( NOT required )
    //generate chunk biome
    for(int x = 0; x < 16; x++){
        for(int z = 0; z < 16; z++) {
            biome.setBiome(x, z, chunkBiome);
        }
    }



        return data;

    }


    }
     
    Code (Text):

    Bukkit.createWorld(new WorldCreator(name).generator(new CLASS());
     
     
  7. I can't import biome.setBiome(x, z, chunkBiome);
     
  8. As I said, simply do nothing. Its not even required to iterate over x and z. If you are not capable of doing this, you should probably start with reading and learn to google. Stackoverflow is a great source of information btw.
     
    • Agree Agree x 1
  9. I said that its not required for what you do... so just don't use it if you don't need it.
    You need to import the constructor classes. also chunkBiome is a Biome.<BIOME> ..
     
  10. See this : |||||||||
    upload_2017-6-10_12-2-3.png
     
  11. Learn java. You want spoonfeed, but you wont get any more from us :)
    http://bfy.tw/Ppe
     
  12. To create a void world make a chunk generator and make it set air in the chunks, I'm not sure if spigot supports it but they added a void world type / biome or something
     
  13. ??? Not "null"! It should be like Biome.PLAINS if you need a biome change.
     
  14. How to create a one world plain?
     
  15. Do you want a superflat vor just plains?
    If you want plains take a look at perlin/simplex noise. But you wont be capable of doing this, because its way more complicated then a void world