Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[New API] Problems Generating Flat Worlds

Comments in 'Plugin Development' started by Adaasi, Sep 7, 2014.

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

    Adaasi Active Member

    Joined:
    Aug 14, 2014
    Posts:
    80
    I'm trying to generate a flat world. This is my world generation code:
    PHP:
    $this->getServer()->generateLevel("fworld"null"FLAT", array("2;7,2x3,2;1;"));
    The problem is that the generated world isn't flat.
  2. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,325
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Read my example code in the previous thread.
    • Parameter 3 should be the class name of the generator (i.e. "pocketmine\\level\\generator\\Flat")
    • Parameter 4 should be an array containing different options with the following possible keys:
      • "preset": the preset string.
      • "decoration": if you want decoration, add this key with any values (usual practice is true). If no, don't.
      • "mineshaft": the code is commented out, so you can't use it right now.

    P.S. Code in italic looks beautiful, @shoghicp!
    Adaasi likes this.
  3. Adaasi
    Offline

    Adaasi Active Member

    Joined:
    Aug 14, 2014
    Posts:
    80
    Thanks :).
Thread Status:
Not open for further replies.

Share This Page

Advertisement