Plugin Help [Solved] Send blockbreakeanimation

Discussion in 'Plugin Help/Development/Requests' started by kvq, Oct 26, 2014.

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

    kvq

    How to send blockbreakeanimation packet ?
    Example i have :
    Code:java
    1. int x;
    2. int y;
    3. int z;
    4. int damage = -1;
    5. PacketPlayOutBlockBreakAnimation pack = new PacketPlayOutBlockBreakAnimation(0, x, y, z, damage);
    6. ((CraftPlayer) p).getHandle().playerConnection.sendPacket(pack);


    and how to send blockchange to player
    Metod p.sendblockchange
    Deprecated
     
  2. Offline

    mrCookieSlime Retired Staff

    kvq
    I think damage should be positive...

    Also, you can still use deprecated methods, deprecated just means that you have to look for an alternative at some point... But its still working.
     
  3. Offline

    kvq

    Ooops i sent message to you ))
    I cant find metod , maybe have way with protocol lib ?
     
  4. Offline

    mrCookieSlime Retired Staff

    kvq
    For the animation: damage should be between 1-7

    and you can still use player.sendBlockChange
    it is still working.
     
  5. Offline

    kvq

    i try to make but this dont working
     
  6. Offline

    mrCookieSlime Retired Staff

    What exactly is not working...
    Any errors?
    Also, I prefer to continue this conversation on the Thread rather than in a PM.
    So, everybody else can also see this if they have the same problem.
     
  7. Offline

    kvq

    [​IMG]
    And in game i dont see this block

    oops i'm forgot replay you )

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 14, 2016
  8. Offline

    mrCookieSlime Retired Staff

    You can just click Add @SupressWarning.

    But you should be able to see it ingame... :/
     
  9. Offline

    kvq

    Ok , all working its my fail i think )
    What about crack animation on block , you dont know how its can make ?
     
  10. Offline

    mrCookieSlime Retired Staff

    Just send the packet to the Player with a damage value between 1-7. It should work then.
     
  11. Offline

    kvq

    [​IMG]
    if i change type to Packet
    [​IMG]
     
  12. Offline

    mrCookieSlime Retired Staff

    kvq
    Maybe try sendPacketNearby instead of sendPacket
     
  13. Offline

    kvq

    ((CraftPlayer) p).getHandle().playerConnection.sendPacketNearby(pack);
    ????
    I dont have this metod
     
  14. Offline

    mrCookieSlime Retired Staff

    kvq
    No. for example:
    ((CraftServer)player.getServer()).getHandle().sendPacketNearby(x, y, z, 64, world, packet);
     
  15. Offline

    kvq

  16. Offline

    mrCookieSlime Retired Staff

    What Version of Bukkit are you using???
     
  17. Offline

    kvq

    I'm tested on 1.7.5R1 and 1.7.9R2
     
  18. Offline

    mrCookieSlime Retired Staff

  19. Offline

    kvq

    Last edited by a moderator: Jun 14, 2016
  20. Offline

    mrCookieSlime Retired Staff

    kvq
    Please do not quadruple Post, there is an Edit Button right next to the Date.

    And if this does not solve your issue, I dont know either...
    Normally this should work.

    Seems like you have to ask someone else :/
     
  21. Offline

    kvq

    I'm fixed problem with craftserver
    But how make form PacketPlayOutBlockBreakAnimation to Packet
    [​IMG]
     
  22. Offline

    mrCookieSlime Retired Staff

    kvq
    Dont cast the last number to double, then reply back.
     
  23. Offline

    kvq

    Done
     
  24. Offline

    mrCookieSlime Retired Staff

    So its working now?
     
  25. Offline

    kvq

    no
    [​IMG]
     
  26. Offline

    mrCookieSlime Retired Staff

    kvq
    ....Please show me the full message. If it suggests you a cast. Click it.
     
  27. Offline

    kvq


    [​IMG]
    [​IMG]
     
  28. Offline

    mrCookieSlime Retired Staff

    kvq
    Are you building against CraftBukkit and not Bukkit?
     
  29. Offline

    kvq

    [​IMG]
    you about this ?
     
  30. Offline

    mrCookieSlime Retired Staff

    Why do you have 2 spigots, bukkit and craftbukkit in there ?,?

    Anyway, as long as there is CraftBukkit it should work :/
    Sorry, I have no idea why this isn't working.
     
Thread Status:
Not open for further replies.

Share This Page