Have projectiles spawn at the creature's eye position (#598)

This commit is contained in:
GreatWyrm 2022-03-15 19:59:15 -04:00 committed by GitHub
parent db2d00819c
commit 2f5661b313
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;