Fix wrong captured lightningBolt entity.

This commit is contained in:
IzzelAliz 2020-07-10 14:49:31 +08:00
parent 2a9619205f
commit 9bc66e5552

View File

@ -29,7 +29,7 @@ public class CraftEventFactoryMixin {
BlockPos damageEventBlock = ArclightCaptures.getDamageEventBlock(); BlockPos damageEventBlock = ArclightCaptures.getDamageEventBlock();
if (damageEventEntity != null && entityDamage == null) { if (damageEventEntity != null && entityDamage == null) {
if (source.damageType.equals(DamageSource.LIGHTNING_BOLT.damageType)) { if (source.damageType.equals(DamageSource.LIGHTNING_BOLT.damageType)) {
entityDamage = entity; entityDamage = damageEventEntity;
} }
} }
if (damageEventBlock != null && blockDamage == null) { if (damageEventBlock != null && blockDamage == null) {