1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Force Chunk Generate

Discussion in 'Development' started by Daniktheboss, Mar 10, 2018.

  1. Daniktheboss

    Daniktheboss Baby Zombie

    Messages:
    144
    GitHub:
    daniktheboss
    Code:
    PHP:
    $level $player->getLevel();
    $rand mt_rand(-100100);
    $x $player->x+$rand;
    $z $player->z+$rand;
    var_dump($level->generateChunk($x,$z));
    $level->generateChunk($x,$z,true);;
    But it always returns NULL
     
  2. SalmonDE

    SalmonDE Zombie Pigman

    Messages:
    739
    GitHub:
    SalmonDE
  3. dktapps

    dktapps Administrator Staff Member PMMP Team

    Messages:
    774
    GitHub:
    dktapps
    don't forget that chunk generation is asynchronous.
     
  4. Daniktheboss

    Daniktheboss Baby Zombie

    Messages:
    144
    GitHub:
    daniktheboss
    Well, i generate it because i need to do "getHighestBlockAt", but if its not generated, i cant return it
     
  5. Daniktheboss

    Daniktheboss Baby Zombie

    Messages:
    144
    GitHub:
    daniktheboss
  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.