valence-rs/valence

Damaging entities + death

SelfMadeSystem opened this issue · 0 comments

Describe the problem related to your feature request.

We need a way to damage & heal entities. We can currently just set their health via valence_entity::living::Health, but there are a few problems with this:

If decrementing health:

  1. This doesn't have a damage source (e.g. magic, wither, pvp ig idk, etc.)
  2. The entity's health just drops, without any effect (sound effect, camera effect, etc.)
  3. There's no death either. If the entity dies, they just stay there and if the client gets a death screen, they're soft locked because they can't respawn.
  4. Absorption isn't considered. See #557

If incrementing health:

  1. We have no way of knowing the entity's max health yet. See #555 for EntityAttributes

What solution would you like?

  1. A way to damage entities
  2. Damage sources
  3. A way to heal entities

What alternative(s) have you considered?

Just setting Health, but it has drawbacks as previously mentioned.

Additional context

See net.minecraft.entity.damage