mirror of
https://github.com/Minestom/Minestom.git
synced 2025-03-10 13:49:04 +01:00
Only increment arrow count if the projectile is an arrow (#560)
This commit is contained in:
parent
e4a141be31
commit
83ab75d1bf
@ -178,7 +178,9 @@ public class EntityProjectile extends Entity {
|
||||
.findAny();
|
||||
if (victimOptional.isPresent()) {
|
||||
LivingEntity victim = (LivingEntity) victimOptional.get();
|
||||
if(entityType == EntityTypes.ARROW || entityType == EntityTypes.SPECTRAL_ARROW) {
|
||||
victim.setArrowCount(victim.getArrowCount() + 1);
|
||||
}
|
||||
EventDispatcher.call(new EntityAttackEvent(this, victim));
|
||||
remove();
|
||||
return super.onGround;
|
||||
|
Loading…
Reference in New Issue
Block a user