8 blocks for Action.RIGHT_CLICK_BLOCK

Discussion in 'Plugin Development' started by KingFaris10, May 21, 2013.

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

    KingFaris10

    So basically, I wanted to use Action.RIGHT_CLICK_BLOCK in an InteractEvent but I wanted it to be so if they right click/left click in an 8 blocks radius and not the reach distance. I want to get the location of the block that a player is looking at, not any other block in the line of sight. Just the one the player is looking at. How do I do this?
     
  2. Offline

    Vandrake

    Block b = p.getTargetBlock(null, 50);

    50 is the range
     
    KingFaris10 likes this.
  3. Offline

    KingFaris10

    Oh my god thank you!!!
     
Thread Status:
Not open for further replies.

Share This Page