Help with breaking packets

Discussion in 'Plugin Development' started by Hoolean, Dec 13, 2012.

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

    Hoolean

    Hello fellow Bukkitteeristers!

    What packet would I need to send to a player to make it look like another player has broken a block. I can't just use Player.sendBlockChange(/* Arguments */) because I need the particles made when a block is broken.

    Thank you!
     
  2. Offline

    tommycake50

    Packet14BlockDig

    EDIT: learn to use your IDE to your advantage.
     
  3. Offline

    fireblast709

    Packet61WorldEvent(2001, x, y, z, blockid, false)
     
  4. Offline

    CeramicTitan

    uh no packets needed... This is done with a play effect
     
  5. Offline

    fireblast709

  6. Offline

    CeramicTitan

    p.getWorld().playEffect(p.getLocation(), Effect.STEP_SOUND,Material.OBSIDIAN.getId()); ~ the block breaking effect of obsidian.
     
  7. Offline

    fireblast709

    CeramicTitan oh... why does it say "Sound of a block breaking." then?
     
  8. Offline

    CeramicTitan

    just try it.

    add it into a command whatever, but it works

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 30, 2016
  9. *Is trying it out*
    Edit: Works like a charm!
     
  10. Offline

    fireblast709

    random... first time the Bukkit API is, like, really wrong
     
  11. How would I do this with red wool?
    Code:
    p.getWorld().playEffect(p.getLocation(), Effect.STEP_SOUND,Material.OBSIDIAN.getId());
    I know how to do it with an ItemStack, but not with an Material.
    With byte data? Like this?
    Code:
    p.getWorld().playEffect(p.getLocation(), Effect.STEP_SOUND,Material.WOOL,(byte)14);
     
  12. Offline

    CeramicTitan

    I was talking to Amaranth and it is not possible for any item that contains a metadata.

    My recommendation would be use redstone as it looks similar to red wool
     
  13. Awww that sucks :( Thanks for the reply :)
     
  14. Offline

    CeramicTitan

    just quickly, what do you mean by itemstack?
     
  15. Code:
    ItemStack redwool = new ItemStack(Material.WOOL, 1, (short) 0, (byte) 14)
    Edit: I've thought of a different way to create red particles. Just use Redstone wires :)
     
  16. Offline

    Kazzababe

    Yes, CeramicTitan didn't say that XD.
     
  17. Offline

    CeramicTitan


    umm this is awkward....
     
  18. Offline

    nisovin

    I wouldn't say it's wrong, since the effect does also make the sound. It just has missing information.
     
  19. Ugh- but....
    wh- ..
    hang on a minute! That wasn't there when I edited my message! D: (I think...) Or I just didn't see that. :p
     
Thread Status:
Not open for further replies.

Share This Page