How can I make this fireball shoot in front of the player? Because when I now fire it, It explodes on my character. Code Code:java if(p.getInventory().contains(Ghast)){ e.setCancelled(true); p.launchProjectile(Fireball.class).setVelocity(e.getProjectile().getVelocity().multiply(2)); }
Try this. Code:java e.setCancelled(true); Vector lookat = p.getLocation().getDirection().multiply(4); Projectile proj = p.launchProjectile(Fireball.class); proj.setShooter(p); proj.setVelocity(lookat);
DogeDev It first hits me and then flys further, but I used the blaze fireball now which works fine DogeDev I used it when they shot with a bow btw EDIT by Moderator: merged posts, please use the edit button instead of double posting.