Solved Bad World generator

Discussion in 'Help' started by AsHAYAMI27, Oct 24, 2019.

  1. AsHAYAMI27

    AsHAYAMI27 Spider

    Messages:
    7
    GitHub:
    AsHAYAMI27
    The world generation of PocketMine-MP is the lowest. There is no cave. There are also few biomes. Can you do anything with plugins?
    (Google Translation jpn->eng)
     
    Last edited: Oct 25, 2019
  2. HeyDeniis_

    HeyDeniis_ Witch

    Messages:
    52
    Yes, you can choose to create a custom world, but this requires a lot of math if you want to use

    PHP:
    use pocketmine\level\generator\GeneratorManager;
    use 
    myNamespace\CustomWorld;

    public function 
    onEnable(){
    GeneratorManager::addGenerator(CustomWorld::class, "mygen"true);
    }
    //To create world use
    $gen GeneratorManager::getGenerator("mygen");
            
    $this->getServer()->generateLevel("MyWorldName"null$gen, []);
    in Your Class CustomWorld:

    PHP:
    <?php

    namespace myNamespace;

    use 
    pocketmine\level\generator\Generator;
    use 
    pocketmine\level\ChunkManager;
    use 
    pocketmine\utils\Random;
    use 
    pocketmine\level\Level;
    use 
    pocketmine\math\Vector3;
    use 
    pocketmine\block\Block;

    class 
    CustomWorld extends Generator{

    public function 
    __construct(array $c = []){
        
    $this->$c;
        }
    public function 
    getName(){
        return 
    "MyWorld";
    }
    public function 
    init(ChunkManager $lRandom $r) : void{
        
    $this->level $l;
    }
    public function 
    generateChunk($cx$cz) : void{
       
    $l $this->level;
    $chunk $l->getChunk($cx$cz);
        
    // code of you $chunk to generate world
    $chunk->setX($cx);
    $chunk->setZ($cz);
    $chunk->setGenerated();
    $l->setChunk($cx$cz$chunk);

          }
    public function 
    populateChunk($x$z) : void{
       
    }
    public function 
    getSettings() : array{
        return 
    $this->c;
    }
    public function 
    getSpawn() : Vector3{
        return new 
    Vector3(0100);
        }
    }
     
    Last edited: Oct 24, 2019
  3. AsHAYAMI27

    AsHAYAMI27 Spider

    Messages:
    7
    GitHub:
    AsHAYAMI27
    I'm sorry, I can't php ...
    I did something similar before and eventually failed. Can you make a plug-in if you can? I'm sorry.
    (Google Translation)
     
  4. HeyDeniis_

    HeyDeniis_ Witch

    Messages:
    52
    Like I said you need a good math logic, and I'm not very good with these logics, I probably couldn't make a world like Vanilla From Minecraft!
     
  5. EdwardHamHam

    EdwardHamHam Skeleton

    Messages:
    926
    GitHub:
    edwardhamham
    What's easier to do is create a world on Minecraft Java and move it over to your PocketMine server. Although you'd first have to make sure that there aren't any blocks or items in it that aren't yet part of PocketMine (or Bedrock Edition). Last I checked, Java Edition worlds are still compatible with PM (correct me if I'm wrong)
     
  6. HeyDeniis_

    HeyDeniis_ Witch

    Messages:
    52
    But After Passing It To pocketmine the next parts of the world that have not yet been generated will be generated by pocketmine so it will go back to pocketmine
     
  7. HimbeersaftLP

    HimbeersaftLP Chicken

    Messages:
    1,786
    GitHub:
    HimbeersaftLP
    EdwardHamHam likes this.
  8. AsHAYAMI27

    AsHAYAMI27 Spider

    Messages:
    7
    GitHub:
    AsHAYAMI27
    I just want to add a biome, cave, flower ...
     
  9. AsHAYAMI27

    AsHAYAMI27 Spider

    Messages:
    7
    GitHub:
    AsHAYAMI27
    I don't want to move the server type too much because many people are already playing ...
    (Google Translation)
     
  10. HimbeersaftLP

    HimbeersaftLP Chicken

    Messages:
    1,786
    GitHub:
    HimbeersaftLP
    Well if you change the world generator it'd be best to make a new world anyways, because otherwise people would need to go very far to find any structures and the border between the new chunks would look weird.
    And if you make a new world, there's no reason you can't move to BDS unless you're using plugins.
     
    EdwardHamHam likes this.
  11. GamakCZ

    GamakCZ Zombie

    Messages:
    257
    GitHub:
    GamakCZ
  12. AsHAYAMI27

    AsHAYAMI27 Spider

    Messages:
    7
    GitHub:
    AsHAYAMI27
    Thank you, everyone!
    After unzipping MultiWorld into a folder and making changes, the “custom” world type was available. It is solved!
     
    EdwardHamHam likes this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.