Enderdragon Death Effect

Discussion in 'Plugin Development' started by BlissGaming, Dec 7, 2013.

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

    BlissGaming

    Hey all
    I'm developing a plugin but I'm searching for a way to get the Enderdragon death effect, I could make it so it spawns a Enderdragon that dies instantly, but I don't know if it wil create a portal or not. And if possible, can you give me a way to not get an Enderdragon involved? :)
     
  2. Offline

    BeaztX

    If you know java then just simply spawn a enderdragon, setHealth(0)then if the portal spawns, make a check for nearby blocks with a ScheduledSyncDelayedTask, and use like 10, 100, 10 blocks
    and if any of them are portal frames or endportals just make it replace them with air
     
  3. Offline

    NathanWolf

    It would be super awesome if there was a packet for that effect alone, but I doubt there is. :(
     
  4. Offline

    Chlorek

    I am also interested with getting that effect only, without spawning enderdragon etc.. Might it be done somehow without packets or spawning enderdragon?
     
  5. Offline

    iiHeroo


    He probably knows Java, I think he just wanted to see if there was just an effect.
     
  6. Offline

    Chlorek

    Also, BeaztX 's method is very heavy and it simply looks "bad".
     
  7. Offline

    BeaztX

    Any better suggestions untill there's a effect for it now?
     
  8. Offline

    Chlorek

    BeaztX
    Noo ;( But it does not mean we should do it this way.
     
  9. Offline

    BlissGaming

    Thanks for the help so far, I don't dislike BeatzX's way of doing it, but it just looks kinda... idk.
     
  10. Offline

    NathanWolf

    It also has the potential to be really destructive, not an "effect" you'd want to use in a town!
     
  11. Offline

    wouterrr

    Wow, never thought of this, but it would be so awesome if it is possible with a packet or something like that.
     
  12. Offline

    TheUpdater


    might work
    step 1
    make a timer

    step 2
    spawn enderdragon then kill it
    make sure to define it, you might be able to set spawn portal to false or something

    step 3
    use effect of assume
     
  13. Offline

    BlissGaming

    wouterrr
    I think I know you from somewhere... xD
    You're Dutch right?
     
  14. Offline

    wouterrr

  15. Offline

    BlissGaming

    wouterrr
    En... Jij wordt vaak geretweet door Chunkr?
     
  16. Offline

    maciekmm

  17. Offline

    NathanWolf


    Unfortunately that doesn't really show us anything other than a large explosion spawns... it would certainly seem like the rest of the effect (the "rays" we are looking for) are entirely client-driven. (If you see otherwise, I'd love to know, and please point to the specific part of the code- but this is all I'm seeing for when he dies)

    Code:java
    1. if (this.getHealth() <= 0.0F) {
    2. f = (this.random.nextFloat() - 0.5F) * 8.0F;
    3. f1 = (this.random.nextFloat() - 0.5F) * 4.0F;
    4. f2 = (this.random.nextFloat() - 0.5F) * 8.0F;
    5. this.world.addParticle("largeexplode", this.locX + (double) f, this.locY + 2.0D + (double) f1, this.locZ + (double) f2, 0.0D, 0.0D, 0.0D);
    6. }
     
  18. Offline

    BungeeTheCookie

    Wouldn't making a class that extends EntityEnderDragon and import all of the code and constructors work? Have a class that extends EntityEnderDragon, then spawn it, and when it is spawn, it dies, removing all of the xp that is dropped, thus displaying the enderdragon death effect. Even though this would require importing of NMS. I don't really give a damn about that any more. :p
     
  19. Offline

    maciekmm

    We must realize how the client handles that effect.
     
  20. Offline

    wouterrr

  21. Offline

    NathanWolf

    Some of us are watching this thread for answers / ideas related to the topic... Maybe you guys can PM? :)
     
  22. Offline

    TheLexoPlexx

    Spawn an Invisible EnderDragon and kill it milliseconds later. Make sure the Boss-Bar is also disabled.
     
  23. Offline

    Chlorek

    @ up
    Wow, you are soo clever. Just kidding. We can achieve this but we want to do it in some better way. As far as I know client does not receive any informations about spawning this effect, it is fully driven but client, when entity (dragon) dies. Nothing else ;/
     
  24. Offline

    Jogy34

    One way to do it is to spawn an ender dragon then play the death entity effect on it. I believe it would move around this way though so you'd have to find a way to stop it.

    Something else you could do is to create a custom entity have it extend EntityBat (or EntityEnderDragon but then it might destroy blocks) then when adding it onto the server make sure the network id is 63 which is that of an ender dragon which will make it appear to be an ender dragon to any clients. Then override the h() method and leave it empty. The h() method is the method that is called every tick, leaving this empty will make it stay still. Then play the death entity effect on this new entity after you spawn it. I've tested this and it does work but it requires using quite a bit of NMS code so if you aren't familiar with that I wouldn't recommend it.
     
  25. Offline

    maciekmm

    Jogy34 but it's still spawning wntity. We want to achieve that w/o doingv that.
    Maybe sending proper packets?
     
  26. Offline

    Jogy34

    The death effect is tied into the entity (the 'getHandle()' method of craftbukkit entities (CraftEntity) returns the NMS Entity), there isn't a way to achieve it without having the entity.
     
  27. Offline

    DusRonald

    Search into the files of the Minecraft Sounds. There is a audio file for a Enderdragon.
    Then you can play that audio with playSound() method.
     
  28. Offline

    Techy4198

    DusRonald Are you serious? Did you even read any of this thread? Sounds like you looked at the title and posted the first thing that came to your mind...
     
  29. Offline

    Jogy34

    *Slow Clap* Way to necro a nearly year old thread.
     
Thread Status:
Not open for further replies.

Share This Page