Bug Closed · Resolved

~onKill trigger for MythicMobs

#5946 opened by Unknown 1 year ago

Unknownreported this bug

Summary

An ~onKill trigger

Usage

Example: a zombie killed another mob, then infect it into a zombie

Value

Very important, why there's only ~onKillPlayer?

Priority

High, and it's not very hard for adding it

Implementation

In versions lower than 1.20.6

EntityDeathEvent -> getLastDamageCause -> instanceof EntityDamageByEntityEvent -> if true, getDamager() -> killer is the mob

Higher:

EntityDeathEvent -> getDamageSource -> blabla -> killer is the mob

Unknowncommented

The use-case described can be accomplished by granting an onDeath aura conditionally, such as checking the targets' MythicMobType on attack, now opening a way to run skills on death (such as summoning a zombie on death, simulating conversion)

Sign in to join the discussion.