I attempted to use the onhurt but i can't make it play an animation
and cancel the hurt event when not on fire/lava/outofworld.
/**
* @param {Internal.ContextUtils$EntityDamageContext} context
*/
// builder.onHurtTarget(context => global.hurting(context))
global.assbeating = context => {
let { damageSource, entity, damageAmount, amount } = context
if (damageSource != entity.level.damageSources().onFire() && damageSource != entity.level.damageSources().fellOutOfWorld() && damageSource != entity.level.damageSources().lava() && damageSource != entity.level.damageSources().inFire()) {
entity.triggerAnimation("trigger_anims", "weakling")
entity.playSound("rootoffear:entity.wilted.sway")
} else {
entity.triggerAnimation("trigger_anims", "hurt")
}
}