mirror of
https://github.com/GTNewHorizons/Avaritia.git
synced 2026-11-27 15:33:01 +00:00
Fix swrod of the cosmos firing onDeath twice for some mobs (#90)
This commit is contained in:
1 parent
9412321283
commit
7e2f217abe
1 file changed
+6
-3
@@ -69,9 +69,12 @@ public class ItemSwordInfinity extends ItemSword implements ICosmicRenderItem, I
|
||||
victim.func_110142_aN() // getCombatTracker
|
||||
.func_94547_a(new DamageSourceInfinitySword(player), victim.getHealth(), victim.getHealth());
|
||||
if (executionEnabled) {
|
||||
victim.setHealth(0);
|
||||
if (Belmont.isVampire(victim)) victim.onDeath(new EntityDamageSource("infinity", player).setFireDamage());
|
||||
else victim.onDeath(new EntityDamageSource("infinity", player));
|
||||
if (victim.getHealth() > 0) {
|
||||
victim.setHealth(0);
|
||||
if (Belmont.isVampire(victim))
|
||||
victim.onDeath(new EntityDamageSource("infinity", player).setFireDamage());
|
||||
else victim.onDeath(new EntityDamageSource("infinity", player));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
victim.attackEntityFrom(new DamageSourceInfinitySword(player).setDamageBypassesArmor(), attackDamage);
|
||||
|
||||
Reference in new issue
Block a user