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 Zombie Pigman

    Messages:
    663
    GitHub:
    minijaham
    PHP:
    # $level instanceof \pocketmine\level\Level
    $level->loadChunk($x$z);
     
  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:
    38
    GitHub:
    DavyCraft648
    PHP:
    /** @var \pocketmine\math\Vector3 $pos */
    $chunkX $pos->>> 4;
    $chunkZ $pos->>> 4;

    /** @var \pocketmine\level\Level $level */
    $level->loadChunk($chunkX$chunkZ);
     

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.