Claiming Structure Itself

Discussion in 'Plugin Development' started by Burnsalan18, Jan 29, 2017.

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

    Burnsalan18

    Alright so I'm trying to figure out an algorithm to use for creating a block array that will allow me to later manipulate the structure. I was wanting to avoid using a center block but obviously that isn't possible. I was thinking about making it so when you place the first block, it will create add the block to an array (Block[][] b = new Block[x][y]). But from mind to paper this seems a little wonky. What are your thoughts on this?
     
  2. Offline

    Zombie_Striker

    @Burnsalan18
    I'd recommend using a hashmap. Only worry about indexing after you know the min/max for the XYZ.
     
  3. Offline

    mythbusterma

    @Burnsalan18

    Don't store blocks like that, blocks are only transient representations of a certain block on a certain tick. Use BlockStates, or create your own way of representing them, and store the data.
     
Thread Status:
Not open for further replies.

Share This Page