mirror of
https://github.com/Minestom/Minestom.git
synced 2024-09-29 06:57:28 +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();
|
.findAny();
|
||||||
if (victimOptional.isPresent()) {
|
if (victimOptional.isPresent()) {
|
||||||
LivingEntity victim = (LivingEntity) victimOptional.get();
|
LivingEntity victim = (LivingEntity) victimOptional.get();
|
||||||
|
if(entityType == EntityTypes.ARROW || entityType == EntityTypes.SPECTRAL_ARROW) {
|
||||||
victim.setArrowCount(victim.getArrowCount() + 1);
|
victim.setArrowCount(victim.getArrowCount() + 1);
|
||||||
|
}
|
||||||
EventDispatcher.call(new EntityAttackEvent(this, victim));
|
EventDispatcher.call(new EntityAttackEvent(this, victim));
|
||||||
remove();
|
remove();
|
||||||
return super.onGround;
|
return super.onGround;
|
||||||
|
Loading…
Reference in New Issue
Block a user