Claiming chunk attached to current chunk

Discussion in 'Plugin Development' started by xXMaTTHDXx, Jul 29, 2014.

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

    xXMaTTHDXx

    I was wondering, how I could pull off the town claim or factions claiming system where you walk and claim that chunk as long as the chunk is attached to one of the sides of the current chunk?
     
  2. Offline

    The Fancy Whale

  3. Offline

    xXMaTTHDXx

    The Fancy Whale I am not sure how to use the x and z to ensure it is connected to the chunk
     
  4. Offline

    fireblast709

    xXMaTTHDXx subtract the x's, take the absolute. Subtract the z's, take the absolute. Add both together. If the value is 0, it's the same chunk. If the value is 1, it's one of the 4 adjacent chunks. More cannot be guaranteed without the use of if statements.
     
  5. Offline

    xXMaTTHDXx

    fireblast709, I am a bit confused on how to do this though, could you show some pusedo code? Just cause I am a bit confused.
     
Thread Status:
Not open for further replies.

Share This Page