Get block Looked At

Discussion in 'Plugin Development' started by Meta1203, Jan 21, 2011.

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

    Meta1203

    Hello again!
    This time I am trying to find a block that a player is looking at! Just, there is no java doc for this...
    Please Help!
     
  2. Offline

    Samkio

    At the moment there is no simple method of doing this but it is possible.
    Take a look at the sources for ARCTeleport and Flashlight they both find the block a player is looking at.
    If the sources are readily avaiable im sure if you ask nicely they may share it with you. :)
    If you can't get the source i will teach you how to do it. [​IMG]
     
  3. Offline

    Novar234

    OMG, blockLook at would be amazing
     
  4. Offline

    NathanWolf

    I've got some functionality ported from HitBlox that does this in my spells plugin- checkout the Spells.java base class if you're interested. It supports a variable list of what materials are "targetable" through, so it supports targeting through water and glass. (Or whatever you want).

    It needs a lot of cleanup though.
     
  5. Offline

    Tazzernator

    World edit does it..

    /jumpto

    //hpos1

    etc

    Checkout his source code :)
     
Thread Status:
Not open for further replies.

Share This Page