Get block(s) relative to player direction

Discussion in 'Plugin Development' started by Rabrg, Feb 1, 2015.

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

    Rabrg

    I'm trying to get the blocks left and right of the block a player is mining. Since the player could be mining in any direction, I can't simply get the blocks east, west, etc to the block being mined, as the player could be mining in any direction.

    How would I do this?
     
  2. @Rabrg Het he players location then subtract x amount of blocks.
     
  3. Offline

    Rabrg

  4. Offline

    GriffinPvP

    @Rabrg Do you only need this for mining? If so listen to a BlockBreakEvent, get the blocks and the relatives?
     
  5. Offline

    Rabrg

    @GriffinPvP I know, that's what I have, but I need to consider direction which is where I'm confused.
     
  6. Offline

    Burnett

    @Rabrg I believe you can get the block face that the player is mining.
     
Thread Status:
Not open for further replies.

Share This Page