Need to show a health bar over an EnderCrystal

Discussion in 'Plugin Development' started by Scizzr, Mar 15, 2014.

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


    So I'm working on a plugin which involves attacking an EnderCrystal multiple times to destroy it. I need to have the count shown for how many times it's been damaged. I already have a method that creates some health bar text to show over a LivingEntity's head, but the problem is that EnderCrystal does not implement LivingEntity, and thus cannot receive a custom nameplate.

    My initial thoughts were to put a bat on top and make the bat invisible, but that wouldn't work because invisible mobs don't show their nameplates, and a bat in the way would be unsightly.

    I then stumbled upon this thread and subsequently this concept. This seems to be similar to what I want, however it requires the player to actively "look at" a block to show the message and I think setting it up with code (messing with Block, Map, etc) would be a pain when all I want is a simple nametag.

    Finally, I found the holograms library, however I don't know if it will be reliable and unchanged in future versions of Minecraft, since it's technically a bug.

    So now I'm sitting here stuck, just trying to decide whether or not I should use the bug or not. What are your thoughts, and can you think of any viable alternatives?

    Thanks! :)
  2. Offline


    Abuse the bug for all it's worth. That's what Bukkit plugins are all about!

    Err... not to bash the entire community or anything...
  3. Offline


    The Ender Crystal isn't a block, It's an entity. just give it a custom display name and change it to visible.

    Maybe you have to create a "custom" Ender crystal which has live. There are some tutorials about that in the "Resources" forums. A great one was made by TeeePeee
Thread Status:
Not open for further replies.

Share This Page