mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-27 13:06:02 +01:00
Launch fireballs at eye location. Fixes BUKKIT-1155
This commit is contained in:
parent
e520032205
commit
f15785669a
@ -276,8 +276,10 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
|||||||
launch = new EntityFireball(world);
|
launch = new EntityFireball(world);
|
||||||
}
|
}
|
||||||
|
|
||||||
launch.setPositionRotation(getLocation().getX(), getLocation().getY(), getLocation().getZ(), getLocation().getYaw(), getLocation().getPitch());
|
Location location = getEyeLocation();
|
||||||
Vector direction = getLocation().getDirection().multiply(10);
|
Vector direction = location.getDirection().multiply(10);
|
||||||
|
|
||||||
|
launch.setPositionRotation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
|
||||||
((EntityFireball) launch).setDirection(direction.getX(), direction.getY(), direction.getZ());
|
((EntityFireball) launch).setDirection(direction.getX(), direction.getY(), direction.getZ());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user