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

Chunk update

Discussion in 'Development' started by XdmingXD, Jul 23, 2017.

  1. XdmingXD

    XdmingXD Baby Zombie

    Messages:
    158
    GitHub:
    xdmingxd
    Hello everyone
    So when I teleport a player to another world ,well... It's kind of teleported but the chunks are not updating
    Old chunk was displayed while only blocks updated
    However, ONE chunk will somehow update if player break or place a block in that chunk
    For example, X = stone Y = grass(old chunk) and they just stack together
    I've tried this (by @dktapps in the old forum) but it is not working
    PHP:
    $player->getLevel()->clearChunkCache($player->getFloorX() >> 4$player->getFloorZ() >> 4);
    $player->getLevel()->requestChunk($player->getFloorX() >> 4$player->getFloorZ() >> 4$player); 
    Thanks for helping
     
    NickTehUnicorn likes this.
  2. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    Try calling Chunk::setChanged()
     
  3. XdmingXD

    XdmingXD Baby Zombie

    Messages:
    158
    GitHub:
    xdmingxd
    It seems to be not working
    or I am not sure how to call it correctly?
    PHP:
    $player->getLevel()->getChunk($player->getFloorX() >> $player->getFloorZ() >> 4)->setChanged();
     
  4. NickTehUnicorn

    NickTehUnicorn Zombie

    Messages:
    200
    GitHub:
    unickorn
    Same thing happens to me too. Dunno how to fix.
     
  5. dktapps

    dktapps Administrator Staff Member PMMP Team

    Messages:
    774
    GitHub:
    dktapps
    I've lost count of the number of times I've seen this question crop up now... This is a client sided bug, and this question has been asked by about a hundred other people.
     
  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.