KubeJS (Old)

KubeJS (Old)

3M Downloads

[ENHANCEMENT] "entity.damaged" Event Rename

Brittank88 opened this issue · 5 comments

commented

If there was some event that fired every time an entity took damage, this would be EXTREMELY useful for situations where say, entities are suffocating in walls and you wish to prevent that.

The workaround is to cancel it on death, but it would be a nicer way to go about providing entities with invulnerability to specific sources of damage.

See below:

commented

This has been renamed to entity.hurt in 1.18 ^^

commented

Nevermind, seems entity.attack covers this - I thought it covered when an entity is initiating an attack, not receiving damage. Maybe should be renamed?

commented

That event was named like that because of its analogue being the „EntityAttackEvent“ on Forge, I‘m assuming. We could probably add an alias though

commented

Ah, okay, that gives some logic to it. An alias would probably help lesser experienced KJS users though.

commented

This will probably be done in 1.17 as the underlying Architectury event has also been renamed to LIVING_ENTITY_HURT

In general, KubeJS may receive a refactor in 1.17 so I'll just add this to the list of things to do until then ^^