Rolling Back Blocks

Discussion in 'Plugin Development' started by Ultimate_n00b, Oct 10, 2013.

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

    Ultimate_n00b

    What is the best way to rollback blocks?
    I used to store the blocks in a hashmap by chunks, then use Location + BlockState on the other side. I then do each chunk one by one. I noticed though, that a few methods in BlockState a deprecated. Is there a better way to rollback blocks?
     
  2. Offline

    xTrollxDudex

    That's extremely mature...

    Otherwise, there are 3 deprecated methods in BlockStae, I'll bet you can figure it out...
     
  3. Offline

    Ultimate_n00b

    I know what they are. I was just wondering if there is a way to get a old block's data, and then set it to the new block.
     
  4. Offline

    xTrollxDudex

    Ultimate_n00b
    BlockState#getBlock() returns the block represented by the BlockState. Use Block#getLocation() and Block#setType(Material)
     
Thread Status:
Not open for further replies.

Share This Page