RedDustBlood - When someone get hit by pvp reddust comes out

Discussion in 'Archived: Plugin Requests' started by amitkilo, Sep 19, 2013.

  1. Offline

    amitkilo

    Plugin category: FUN

    Suggested name: RedDustBlood - bad name but whatever XD

    What I want:
    A plugin, that when someone gets hit, reddust coming out of him, like the dust that comes out of active redstone ore, I know its possible because I saw it on some servers.

    Ideas for commands:
    No commands

    Ideas for permissions:
    reddustblood.bleed - if you have that you can "bleed" redstone dust.
    if its taking to much time, you don't have to do it, its ok :)

    When I'd like it by:
    As fast as possible :)

    Thanks in advance, Amit.

    **I don't mean "Block breaking" particle, I mean Active Redstone Ore dust.**
     
  2. Offline

    JaguarBolt

    This could be abused, couldn't it? Like someone gets hit, they drop redstone, and they could just pick it up for free redstone. I'll take a try at it, though.
     
  3. Online

    timtower Administrator Administrator Moderator

    JaguarBolt Try sendBlockChange, not real redstone, but it looks like it though, and you can show it powered
     
  4. Offline

    amitkilo

    You guys didn't really got what I meant :S
    I don't want fake redstonedust items, I want the redstone ore effect, its particle called "reddust" and its red if its speed is 0
     
  5. Offline

    bobacadodl

    Code:
    @EventHandler(priority=EventPriority.HIGHEST)
        public void onEntityDamage(EntityDamageByEntityEvent event){
            Entity e = event.getEntity();
            World w = e.getWorld();
            Location locE = e.getLocation();
            w.playEffect(locE, Effect.STEP_SOUND, 55);
            w.playEffect(locE.add(0D, 0.5D, 0D), Effect.STEP_SOUND, 55);
            w.playEffect(locE.add(0D, 1.0D, 0D), Effect.STEP_SOUND, 55);
            w.playEffect(locE.add(0D, 2.0D, 0D), Effect.STEP_SOUND, 55);
    }
    I used this code in one of my plugins, for the effect you are talking about
     
  6. Offline

    DSH105

    Sorry for bumping, but this is the effect I believe amitkilo was looking for:

    Code:java
    1.  
    2.  
    3. try {
    4. Object packet = Class.forName("net.minecraft.server.v1_6_R3.Packet63WorldParticles").getConstructor().newInstance();
    5. setValue(packet, "a", "reddust");
    6. setValue(packet, "b", (float) location.getX());
    7. setValue(packet, "c", (float) location.getY());
    8. setValue(packet, "d", (float) this.getZ());
    9. setValue(packet, "e", 0.5f);
    10. setValue(packet, "f", 1f);
    11. setValue(packet, "g", 0.5f);
    12. setValue(packet, "h", 0F);
    13. setValue(packet, "i", 100);
    14. return packet;
    15. } catch (Exception e) {
    16. //it failed
    17. }
    18.  
    19.  


    Code:java
    1.  
    2.  
    3. public static void setValue(Object instance, String fieldName, Object value) throws Exception {
    4. Field field = instance.getClass().getDeclaredField(fieldName);
    5. field.setAccessible(true);
    6. field.set(instance, value);
    7. }
    8.  
     
  7. Offline

    amitkilo

    _DSH105_
    Thanks!, that's look like it, because you can spawn it with "reddust" with particle speed "0"
    If someone can do it, it will be great :)
     
  8. Offline

    SnapyT

    I have a custom plugin like this on my server. But my plugin is also spitting out a configurable item when hitting a player. It also says "Profit Hit!" When you hit the player.

    I can't give this plugin out, because it has allot of other features in it. But i can try making an plugin that does only the redstone dust bleeding.

    Thank You!
    - SnapyT
     
  9. Offline

    amitkilo

    SnapyT
    Hey dude, sorry, but I found a way to make it work with kind of a "magic spells" plugin
    by spawning particle on getting hit, sorry for making you work S:
     
  10. Offline

    SnapyT

    amitkilo
    I didnt make the plugin for you, i just offered to make one.
     
  11. Offline

    amitkilo

  12. Offline

    seiterseiter

    Isnt there a plugin called "Blood" that does exactly this?
     
  13. Offline

    amitkilo

Share This Page