Update block state works with unloaded chunk?

Discussion in 'Spigot Plugin Development' started by Fkz, Aug 7, 2018.

  1. Fkz

    Fkz

    So, I wrote a code that when you break a block, it update its state, so it will "regen"..
    But, If I break a block, go out of the chunk, and the chunk gets unloaded, will it regen?

    Obs: I update the block state to "regen" it..
     
  2. Try it. Break a block and fly away
     
    • Like Like x 1
  3. Updating the block state (or updating any block for that matter) requires the chunk to be loaded; if it wasn't loaded before it will be loaded in to make those changes. Chunks get unloaded when you leave a single player server (if you want to be sure, use clear lagg and unload chunks), so it should be quick work to verify this yourself
     
    • Agree Agree x 1
    • Winner Winner x 1