Solved Block to the right of another block.

Discussion in 'Plugin Development' started by chaseoes, Dec 28, 2012.

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

    chaseoes

    I need to get the block to the right of a block a player is looking at.

    Any ideas?
     
  2. Offline

    raGan.

    Take direction the player is looking and then check targeted block's side accordingly.
     
  3. Offline

    chaseoes

    Ideas on how to get the direction the player is looking in the form of a BlockFace? :p
     
  4. Offline

    DJSanderrr

    With alot "if"s
     
  5. Offline

    chaseoes

    Not much help.
     
  6. Offline

    raGan.

  7. Offline

    DJSanderrr

    Yeah sorry.. I am not on the comp right now sow don't have autocorrent for code bu:

    If (player.getLocation().getDirection().SOUTH){
    Block.setBlockFace.SOUTH();
    }
    Something like that?
     
  8. Offline

    raGan.

    To expand this a little:
    If player is looking NORTH you need to check block's EAST
    If player is looking SOUTH you need to check block's WEST
    If player is looking WEST you need to check block's NORTH
    If player is looking EAST you need to check block's SOUTH
     
  9. Offline

    DJSanderrr

    Yeah i know but it was just the idea, and i am on my iPod so it is also not 100% valid
     
  10. Offline

    chaseoes

    getDirection() returns a Vector, not a direction. :|

    Thanks anyways - figured it out!
     
  11. Offline

    DJSanderrr

    Glad you figured you!
     
Thread Status:
Not open for further replies.

Share This Page