Skip to content

Add lastDamageSource to living entities #12557

@Fusezion

Description

@Fusezion

Is your feature request related to a problem?

Supporting lastDamageSource is from my perspective a better implementation to lastDamageCause and provides the same and more information to the users. Especially in cases where a custom damage type might be defined.

Describe the solution you'd like.

I would like a method added onto LivingEntity preferably like #getLastDamageSource matching it along with getLastDamage and getLastDamageCause

Describe alternatives you've considered.

I haven't considered any alternatives to this implementation

Other

While I'm aware that getLastDamageCause returns EntityDamageEvent I find this behavior of it in poor taste, I would rather use a method provided by minecraft than one that I assume is custom made by the server.

Metadata

Metadata

Assignees

No one assigned
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions