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

Help me about load a chunk

Discussion in 'Help' started by Nguyen Minh Phap, Jul 14, 2021.

  1. Nguyen Minh Phap

    Nguyen Minh Phap Creeper

    Messages:
    2
    GitHub:
    phatsh159
    how to load chunk at a specific location, even when no player is there, that area can still work, can someone help me
     
  2. minijaham

    minijaham Skeleton

    Messages:
    801
    GitHub:
    minijaham
    PHP:
    # $level instanceof \pocketmine\level\Level
    $level->loadChunk($x$z);
     
    Agent likes this.
  3. Nguyen Minh Phap

    Nguyen Minh Phap Creeper

    Messages:
    2
    GitHub:
    phatsh159
    How do i get the x,z
     
    Last edited: Jul 14, 2021
  4. DavyCraft648

    DavyCraft648 Spider Jockey

    Messages:
    40
    GitHub:
    DavyCraft648
    PHP:
    /** @var \pocketmine\math\Vector3 $pos */
    $chunkX $pos->>> 4;
    $chunkZ $pos->>> 4;

    /** @var \pocketmine\level\Level $level */
    $level->loadChunk($chunkX$chunkZ);
     
  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.