How to get the bloc the player is targeting with his mouse ??

Discussion in 'Plugin Development' started by JoeMaximum, Jan 25, 2011.

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

    JoeMaximum

    Ok, i search this forum a lot and did not find anything that do exactly this.
    I found some piece of code in the Spells plugin, but the getTargetBlock() function only return one bloc in front of you. Or maybe it is just that i incorporated it wrongly in my plugin.

    So anyone know how to get it in a simple function ?
     
  2. Offline

    mjmr89

    I'm not sure, but I think the Flashlight plugin knows how to get it, maybe you should take a look at its source.
     
  3. Offline

    JoeMaximum

    I cant find any source for the flashlight plugin.
    I can get the next bloc in front of me, but i cant get the bloc that my mouse is over.
    I am now trying with ARCTeleport code, maybe i'll be more lucky.

    Edit : lolll, the minute after i posted this ... i manage to make it work :)
    So now, it gives me the correct bloc, wich is the one i am looking at :D.
     
Thread Status:
Not open for further replies.

Share This Page