yeelp / Distinct-Damage-Descriptions

Adding physical D&D-style damage types to Minecraft to deepen the combat
MIT License
9 stars 4 forks source link

DDDCombatRules.getLastHit(UUID) should return an Optional<HitInfo> to avoid NPE's or be changed altogether #62

Closed yeelp closed 2 years ago

yeelp commented 3 years ago

Mods like 12M (MmmMmmMmmMmm) fire their own LivingHurtEvent without a LivingAttackEvent. This reveals a fundamental problem:

If a LivingHurtEvent is fired without a LivingAttackEvent, the whole thing crashes.

Either wrap the HitInfo in an Optional, or redo the damage calculation process.

Xarmat-GitHub commented 3 years ago

Tentacle Pastbin: https://pastebin.com/rLZgLt75

One More: https://pastebin.com/uVE6je3a

Notes: