mirror of
https://github.com/Minestom/Minestom.git
synced 2024-06-22 20:44:54 +02: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();
|
||||
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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user