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

How do you check if a chunk is corrupt?

Discussion in 'Development' started by eDroid, Dec 26, 2016.

  1. eDroid

    eDroid Witch

    Messages:
    59
    GitHub:
    edroiid
    Hello! I am currently creating a plugin with a friend and it teleports a player to a random set of coordinates. How would I check if the chunk within the coordinates is corrupt? Thanks in advance!
     
  2. TheDragonRing

    TheDragonRing Witch

    Messages:
    64
    GitHub:
    dragonwocky
    Corrupted chunk checking? I'm not sure if that's possible... I'm pretty sure you can check whether or not a chunk is loaded, I just can't remember off the top of my head. If I figure it out I'll update this post.
     
  3. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    mind if i ask how does a corrupted chunk looks?
    i suspect it is just plain void, so you will just check if pos is safe to spawn
     
  4. Sandertv

    Sandertv Zombie Pigman Poggit Reviewer

    Messages:
    786
    GitHub:
    Sandertv
    It differs widely. Sometimes corrupted chunks just get converted to normal generator chunks, sometimes they crash you when getting near one, but for none of those I think there's a way to check for those.
     
  5. ZakousseMC

    ZakousseMC Spider Jockey

    Messages:
    46
    GitHub:
    ZakousseMC
    On my server, most of them look like this :
    Screenshot_1.jpg Screenshot_2.jpg Screenshot_3.jpg but you can also find the full void chunk, but sorry I coudn't find one.
     
  6. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    Ohhh indifference chunks, no idea
    you could check with a forumlar or so on but there will be a slight chance that someone just build a structure that send a false trigger
     
  7. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    but for the full void chunk, you just need to check for a place player can land ex a block and that should do the trick
     
  8. dktapps

    dktapps Administrator Staff Member PMMP Team

    Messages:
    774
    GitHub:
    dktapps
    Corrupted chunks don't look like anything, PocketMine will generate a new one to replace the corrupted one.
     
  9. ZakousseMC

    ZakousseMC Spider Jockey

    Messages:
    46
    GitHub:
    ZakousseMC
    EDIT : Yeah this should work
     
  10. ZakousseMC

    ZakousseMC Spider Jockey

    Messages:
    46
    GitHub:
    ZakousseMC
    But most of them aren't critical, the player does not crash, I mean, when I moove into the chunks I just showed you, I don't crash. So this isn't much of a problem (well this type of corrupted chunks)
     
  11. Sandertv

    Sandertv Zombie Pigman Poggit Reviewer

    Messages:
    786
    GitHub:
    Sandertv
    PC imported maps sometimes do happen to have corrupted chunks which crash you when getting near them.
     
    ZakousseMC likes this.
  12. ZakousseMC

    ZakousseMC Spider Jockey

    Messages:
    46
    GitHub:
    ZakousseMC
    I didn't know that, thanks!
     
  13. 0x15f

    0x15f Baby Zombie

    Messages:
    145
    GitHub:
    0x15f
    Corrupted chunks have lines of grass blocks that never end, it's like a chunk with void/grass stripes.
     
    Sandertv likes this.
  14. Sandertv

    Sandertv Zombie Pigman Poggit Reviewer

    Messages:
    786
    GitHub:
    Sandertv
    But these can be found anywhere if you teleport REALLY far in a world.
     
  15. ZakousseMC

    ZakousseMC Spider Jockey

    Messages:
    46
    GitHub:
    ZakousseMC

    I'm not sure of the "Really far" because I find some of them at only like 500 blocks of the spawn sometimes.
     
  16. dktapps

    dktapps Administrator Staff Member PMMP Team

    Messages:
    774
    GitHub:
    dktapps
    That's not corruption, that's just MCPE unable to tolerate the FarLands.
     
  17. 0x15f

    0x15f Baby Zombie

    Messages:
    145
    GitHub:
    0x15f
    Exactly MCPE cannot handle the chunks so they become corrupted.
     
    Dog2puppy likes this.
  18. imYannic

    imYannic Baby Zombie

    Messages:
    113
    You don't crash anymore, MCPE 15.0 fixed the unknown metadata bug in the blocks which caused a crash.
     
  19. ZakousseMC

    ZakousseMC Spider Jockey

    Messages:
    46
    GitHub:
    ZakousseMC
    So I advise you to check if the player can land or not and if there is a big variation of the z axis behind (pictures up) (I'm not sure if you can check the variation though, I just started coding soooo if you can, do it)
     
  20. Dog2puppy

    Dog2puppy Slime

    Messages:
    94
    GitHub:
    colesquared
    HimbeersaftLP likes this.
  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.