The Erebus

The Erebus

16M Downloads

Mobs are applying poison on collision rather than on attack

Funwayguy opened this issue ยท 2 comments

commented

This may not seem like a big deal but this bypasses invincibility frames on the player as well as applying effects to entities even if the mob isn't hostile to them. Please use vanilla Cave Spiders as a reference on how to properly set this up, i.e. checking first if the attack was successful then applying the potion side effect.

Known affected mobs:

  • EntityWasp
  • EntityScorpion
  • EntityCentipede

In addition to potion effects, other mob abilities such as the Scorpion's grab attack, apply on collision also bypassing attack cool downs and hostility checks. These should be preferably moved to 'attackEntityAsMob()' as well

commented

I'll ignore the comment about the Spiders thanks.
Instead of applying the poison to the mobs collision, I will move it to an AI class and re-write the 3 year old code that is used on these mobs ;)

commented

Sorted. Should be OK now. Didn't need any new AI as I already had it set up to work, it just was never changed in the code. It must have been overlooked as the AI's were changed over time. :)