Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Is it possible to have a player reload chunks?

Comments in 'Plugin Development' started by args, Sep 8, 2014.

  1. args
    Offline

    args New Member

    Joined:
    Jun 14, 2014
    Posts:
    47
    Minecraft User:
    args
    I've got some code at the moment,
    When a player first joins the server, the plugin creates a box at 0,100,0, and the player then is teleported into the box.
    The box however is invisible and the player looks like he is walking in air.
    When the player tries to break one of the bricks though, all the invisible ones load.

    Is there a way to reload that chunk for the player?
  2. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    sendChunk() maybe? But the doc comment says it is for internal use only.
    args likes this.
  3. args
    Offline

    args New Member

    Joined:
    Jun 14, 2014
    Posts:
    47
    Minecraft User:
    args
    Yeah ill try it out, thanks.
    I feel like there's some way to fake a block break by player event if i try a couple of things, or at least some other function that will also cause the blocks to update. Anyway at least the player appears in the room, so technically the plugin will still function, and it's only an error for the first person joining the server, all players who join after its run once don't have that problem.

    I'll test it out tomorrow and post back any results i can come up with :)

    So far sendChunk() causes the client to freeze, it's either because it's not good for that use or because i dont know what the parameter $payload is supposed to be, any idea?
    Last edited: Sep 8, 2014
    PEMapModder likes this.
  4. Adaasi
    Offline

    Adaasi Active Member

    Joined:
    Aug 14, 2014
    Posts:
    78
    I think is a Minecraft PE bug.
    For example when you change world, you will see old chunks or invisible chunks.
    I reported this bug to @shoghicp and he said that it's a Minecraft PE Bug.
  5. args
    Offline

    args New Member

    Joined:
    Jun 14, 2014
    Posts:
    47
    Minecraft User:
    args
    Yeah I guess it's because mcpe tries to load the world based off the seed before actually downloading chunks, and also its saving the last joined server. Those together seem to be interfering with the downloading of new chunks :/


    right now im trying to work out how to use this function, as it should update the block. It causes an exception at the moment though.. Im not sure why.. Maybe the face int 1 is not usable in this case.... Oh well. I might come back to this later if i don't manage to work out a way by tomorrow.
    useItemOn(new Vector3(2,100,2),$i,1);
    PEMapModder likes this.

Share This Page

Advertisement