Shrinking world block by block?

Discussion in 'Plugin Development' started by IconByte, Feb 24, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    IconByte

    Hello. I am wondering how I would make something like shrinking world..? I mean that when I make cuboid area then it is going to get the centre and then it is removing blocks from sides. Pretty much like 1.8's worldborder, but I would like it redo with blocks.
    Any useful answers would be appreciated!
     
  2. Offline

    mine-care

    get point 1 and loopthrough its dimentions removing blocks, same for point 2 =) if you want changes to be undone you need to somehow store locations and also what blocks where there ect. On undo, loop through the saved changes and pace the blocks back.
    Mabe you should consider the use of thread/s for such operations and not run them from server's main thread to prevent freezing ect.
     
  3. Offline

    IconByte

    //Nvm
     
    Last edited: Feb 24, 2015
  4. Offline

    teej107

    @IconByte I think sending packets tricking the client that the blocks aren't there would be better than modifying the world.
     
  5. Offline

    IconByte

    @teej107 That seems pretty nice, but this wouldn't be easier, right? Also, I knew that I saw it somewhere and I realised that it was on the Mineplex's Microbattle minigame, where the world is shrinking block-by-block.
     
  6. Offline

    Divinity Realms

    @IconByte You could load all the blocks in the world and make them registered "Block b" by getting the blocks at a certain location. Then spawn a falling block at that blocks location and then make it get the block there before's type then spawn it. That would be quite laggy and hard to find a way to register all the blocks easily. It might also have to be in a runnable constantly removing the blocks 1 by 1
     
  7. Offline

    teej107

    @IconByte There is a method in the Bukkit API to convieniently send block changes to a client.
     
  8. Offline

    _Filip

    @IconByte Yes but maps there are at most 100^2
    Think how many blocks you will need to delete
    8(length)
     
Thread Status:
Not open for further replies.

Share This Page