mirror of
https://github.com/Minestom/Minestom.git
synced 2025-02-24 00:01:56 +01:00
Have projectiles spawn at the creature's eye position (#598)
This commit is contained in:
parent
db2d00819c
commit
2f5661b313
@ -109,7 +109,7 @@ public class RangedAttackGoal extends GoalSelector {
|
||||
projectileGenerator = shooter -> new EntityProjectile(shooter, EntityType.ARROW);
|
||||
}
|
||||
EntityProjectile projectile = projectileGenerator.apply(this.entityCreature);
|
||||
projectile.setInstance(this.entityCreature.getInstance(), this.entityCreature.getPosition());
|
||||
projectile.setInstance(this.entityCreature.getInstance(), this.entityCreature.getPosition().add(0D, this.entityCreature.getEyeHeight(), 0D));
|
||||
|
||||
projectile.shoot(to, this.power, this.spread);
|
||||
this.lastShot = time;
|
||||
|
Loading…
Reference in New Issue
Block a user