Solved Surround player with the wither regeneration outline

Discussion in 'Spigot Plugin Development' started by LukeEff, Jan 20, 2020.

  1. Can't figure out how to do this or if it's even possible.

    Pretty much, once a wither enters agro mode, it looks like this: [​IMG]

    I want to have that same visual effect on a player, but am having a really tough time figuring out how to do so.
    I was thinking a few possibilities: A particle effect that can mimic the transparency and math to do this, maybe around the players hitbox, finding a property that probably doesnt exist, like setAgroMode(), or putting an invisible wither over the player that somehow had the hitbox of the player that only showed this.
    Edit: in case it wasn't obvious, i'm referring to the transparent outline that pulses across the wither when it has low health
  2. Have you checked out the minecraft glowing effect? Creates an outline around the player that can be seen through blocks.
  3. Yes, but the problem is I don't want this effect to be visible through walls.
  4. I think that it isn’t possible. You have to edit the client side code, because it’s something that is defined by the client, not by the server. The server only tells the client the wither’s health, than the client shows the external layer. You can do it using mods.
    Maybe you can do something to hide the glowing to players that doesn’t have direct eye contact with the glowing player.
  5. Yeah, I think you're right.

    I don't think there is a way to hide glowing in any cases, btw, but I could be wrong
  6. Maybe there are some classes inside the bukkit API that can track where the player is looking. Than you can get the entities in the view and, if there is one or more blocks between the glowing entity or player, just hide the glowing for the player from which the looking direction is taken. (You can hide it through packets).
    But this is all theorical, you should see the spigot/bukkit docs
    • Winner Winner x 1
  7. Have you considered a charged creeper? You could try making it invisible and giving it no AI, and then just placing it in the same spot as your player. Not sure how well that'd look, but you can definitely try. I believe the aura of a charged creeper does not disappear when it goes invisible.
    • Like Like x 1
  8. That’s not client-side at all, but because the aura is not a different entity, making the creeper invisible will make the aura invisible too
    • Agree Agree x 1
  9. Sounds like it's time for me to learn more about packets.
    Thanks for the pointer
    Going to set this as solved.

    Edit: Yes, I had tried the charged creeper thing and was unhappy with the looks, but I appreciate the suggestion!