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

Chunk loading and unloading

Discussion in 'Development' started by SavionLegendZzz, May 10, 2017.

  1. SavionLegendZzz

    SavionLegendZzz Slime

    Messages:
    75
    GitHub:
    savionlegends
    Okay so i want to unload chunks from a player if they are not looking in the direction of which those chunks are located but i also want to load the chunks that the player is see currently how would i go about this?
     
  2. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    Before anyone else helps you, what code have you used in previous attempts?
     
  3. SavionLegendZzz

    SavionLegendZzz Slime

    Messages:
    75
    GitHub:
    savionlegends
    nothing cause i cant come up with a way to find which chunk(s) the player is looking at
     
  4. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    okay, get the player's facing direction and figure out what chunk they are currently in. Based on the direction, the x/z chunk coordinates will increase and/or decrease
     
    corytortoise and SavionLegendZzz like 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.