[SPIGOT-3629] Extend EntityEffect Created: 29/Oct/17  Updated: 07/Nov/17  Resolved: 07/Nov/17

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Minor
Reporter: Selebrator Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: API, Bukkit


 Description   

org.bukkit.EntityEffest hasn't been updated for 3 years and is missing many new effects.

There will occure some problems when updating:

  • Iron golems and evokation fangs use the same number (4) for their attack. I can not come up with a good name that represents both.
  • Same for number 10. It's used for making sheep eat and TNT minecarts explode.
  • WOLF_SMOKE and WOLF_HEARTS dont represent thier purpose correctly anymore because also ocelots, parrots, and all horse variations use the same effect. So TAME_SMOKE and TAME_HEARTS would be a better fit.

I also find the documentation to be vague or incomplete sometimes.

 

/**
 * When a mob dies.
 * <p>
 * <b>This will cause client-glitches!</b>
 */
DEATH(3)
  • What is a "mob" exactly
  • What does it acctualy do? Play an animation, play a sound, send a message to chat...
  • This effect is also used when a snowball or egg brakes

 



 Comments   
Comment by Selebrator [ 29/Oct/17 ]

btw don't start researching this topic unless you realy want to. I already have a finished and documented class for another project. Just waiting for that notification sothat i can start contibuting...

Comment by Selebrator [ 29/Oct/17 ]

Yeah, wasn't sure if I should mention that. 
Is it an option to have multiple entys with the same data? Then it would be possible to add TAME_SMOKE and TAME_HEARTS and maybe deprecate WOLF_SMOKE and WOLF_HEARTS. That would also work around the other 2 issues, where 2 effects do totaly different things but have the same data value. And in the future Mojang may add new features sharing the same data value.
The only dissadvantage I can think of is that it would make 

EntityEffect.getByData(byte)

return unexpected results. Since that method was intended it for testing by grum and has been deprecated for a very long time I don't think that this outweighs the benefits.
But you habe been designing this API for the last years, so I'm interessted in your oppinion about that.

Comment by md_5 [ 29/Oct/17 ]

>WOLF_SMOKE and WOLF_HEARTS dont represent thier purpose correctly anymore because also ocelots, parrots, and all horse variations use the same effect. So TAME_SMOKE and TAME_HEARTS would be a better fit.

Existing effects cannot be renamed, as that breaks existing usages.

Generated at Sun Mar 30 17:51:35 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.