[BUG] Soft incompatibility with EliteMobs
I-Knight-I opened this issue ยท 6 comments
Describe the bug
Console errors thrown on EntityDeathEvent involving EliteMob.
To Reproduce
Steps to reproduce the behavior:
1 - Install EliteMobs Dev-build here (SpigotMC is heavily out of date)
2 - Enable Entity death logging in Prism
3 - Spawn any EliteMob
4 - Kill it
5 - Profit?
Expected behavior
No errorino
Screenshots
I'll do you one better than screenshots, here's the exception:
Error link: https://gist.github.com/B-Knight49/ce205f6bc00d7ef67a438defa65549e0
Server (please complete the following information):
- Prism Version: v2.1.5-106
- Server Type: Paper-103
- Server Version: 1.15.2
Additional context
N/A. Lemme know if you need anything else.
Apologies, the stacktrace? That is the stacktrace, there's nothing more to it sadly.
I can give you the full log file but I don't think that'll offer much.
E: Ok, a small development:
It seems like it's linked to either the number of hits to kill or their HP. I've noticed that the error throws almost exclusively when I one-shot certain mobs (with different levels of sharpness + difficulty of the EliteMob).
It has also just occurred to me that I edited EliteMobs a while ago to decrease the HP scaling with levels. I can't see how that'd make a difference but I'm going to look more into it regardless. Literally, I changed the number 7 to the number 2 (baseHealth + Level * 7
went to baseHealth + Level * 2
)
No my point was you are using 2.1.5 (an old version) Please reproduce with the latest if you can.
The cause is suppressed in the latest 2.1.7-SNAPSHOT builds however I would point out that the
entity.getLastDamageCause is returning NULL - whether it is suppose to do that in a native situation or whether elitemobs modifed the event - I cannot say - you can try installing whatis and run an eventmonitor against that event and see what happens as the event falls through the handler list. BUT I will say
EntityDamageEvent damageEvent = entity.getLastDamageCause();
should not be returning null in the situation you described.
Thanks for looking into it, mate. And for suppressing the errors.
...Interesting that you mention the damage event. This could even be the result of one of my personal plugins that checks that event to receive the sharpness level of the weapon. I'll look into it.
If nothing else comes to light, I'll mention it to the EliteMobs dev or see what else I can find doing either what you said or through more code-digging.