Only increment arrow count if the projectile is an arrow (#560)

This commit is contained in:
GreatWyrm 2021-12-28 06:06:43 -05:00 committed by GitHub
parent e4a141be31
commit 83ab75d1bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -178,7 +178,9 @@ public class EntityProjectile extends Entity {
.findAny();
if (victimOptional.isPresent()) {
LivingEntity victim = (LivingEntity) victimOptional.get();
victim.setArrowCount(victim.getArrowCount() + 1);
if(entityType == EntityTypes.ARROW || entityType == EntityTypes.SPECTRAL_ARROW) {
victim.setArrowCount(victim.getArrowCount() + 1);
}
EventDispatcher.call(new EntityAttackEvent(this, victim));
remove();
return super.onGround;