Doing something when RightClicking Fake Block

Discussion in 'Plugin Development' started by Draesia, Dec 6, 2013.

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

    Draesia

    I would like to run some code when the player RightClicks a fake block, i.e, one I send to the player via p.sendBlockChange();

    PlayerInteractEvent doesn't seem to work either, it only works on real blocks or air, not fake blocks and not fake air.

    There must be some way, because, when you right click the fake block, the fake block disappears, which means the server must be telling the client that it's fake right? So you should be able to run the code there..

    If anyone could help, that'll be great!
     
  2. Offline

    RawCode

    every time player click on block, server sent blockudate for that block.

    1) Hook packet
    2) Change baseclass

    Some mods just sent fakeblock data again inside event.
     
  3. Offline

    Draesia

    Do you think you could help me a little bit further? I am not very familiar with hooking packets or changing baseclasses. :) Thanks for the information so far though! :)
     
  4. Offline

    RawCode

  5. Offline

    PogoStick29

    If something is unexplainable, how did so many people learn it?
     
    AlexHH251997 likes this.
  6. Offline

    MrInspector

    Probably messed around it for a while.
     
  7. Offline

    Ad237

    Draesia As the client thinks it's a normal block it should still send a packet to the server. I don't know why this doesn't call a PlayerInteractEvent. Maybe you can still catch the packet? I don't know much about packets but I'm sure you can look into it.
     
  8. Offline

    RawCode

    Nobody can teach you to read obfuscated source code of game and understand how it works, without this skill reflections cannot be used on full power.
     
    TigerHix likes this.
  9. Offline

    xize

    hmm I couldn't be sure but maybe this can be possible without nms?

    do you know it is possible to detect a fake block even the material?
    though I barely know what I did back then it whas while I whas experimenting the only problem which is what others also say are the block updates maybe it helps when using update(false) on interaction?

    I could be mistaked with the material on client sided blocks since it whas along time ago:p
     
Thread Status:
Not open for further replies.

Share This Page