Solved Redstone Particle Effects

Discussion in 'Plugin Development' started by BR3TON, Dec 28, 2012.

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

    BR3TON

    Hey I was wondering how I would go about adding the redstone particle effects to a player.
    (Image related)
    Show Spoiler

    [​IMG]
     
  2. Offline

    DJSanderrr

    Guess thats client side, but i'll look

    You can test it on on a server with alot lagg, then touch a redstoneOre. And if it directly gives the reply, when there is lagg, it probarly is clientside

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 30, 2016
  3. Offline

    tbone4747

    minez has this effect when you are hit... I'll look into it, because it doesn't seem clientside if minez is doing it.
     
  4. Offline

    gomeow

    You may need to send packets.
     
  5. Offline

    BR3TON

    Sorry, how do I go about doing this? Also how do I find which packet to send?

    Thanks :)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 30, 2016
  6. Offline

    GodzOfMadness

    Br3ton?
    from KuleDud3? or just because you thought of it? xD
     
  7. Offline

    BR3TON

    I'm BR3TON 'from Kuledud3'
     
  8. Offline

    GodzOfMadness

    just curious :)
     
  9. MineZ doesn't have this effect, but the BlockBreak effect of Redstone dust instead.
     
  10. Offline

    kingstar64

    That's true.
     
  11. Offline

    BR3TON

    Do you know how that is done?
     
  12. Offline

    tbone4747

    TfT_02
    I kind of want to know how too... :)
     
  13. Oh thats very easy, here's how:
    Code:
    player.getWorld().playEffect(player.getLocation(), Effect.STEP_SOUND, Material.REDSTONE_WIRE);
    The javadocs say that its the step sound, but its actually the sound + the particle effect.
     
  14. Offline

    tbone4747

    Its giving me an error on "player"
    PHP:
    player.getWorld().playEffect(player.getLocation(), Effect.STEP_SOUNDMaterial.REDSTONE_WIRE);
    Right at the beginning
    TfT_02
     
  15. Offline

    gomeow

    Well of course you would need to change it to fit in with your code.
     
  16. Yeah, that is a variable for the player which you need to define.
    Something like this, if you're using it in a event, where event is also a variable.
    Code:java
    1. Player player = event.getPlayer();
     
  17. use:
    Code:Java
    1.  
    2. player.getLocation().getWorld().playEffect(player.getLocation(), Effect.STEP_SOUND, Material.REDSTONE_WIRE);
    3.  
     
Thread Status:
Not open for further replies.

Share This Page