Advertisement
Guest User

Untitled

a guest
Jun 28th, 2018
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. public void createBeamEffect4(Player p) {
  2.  
  3. Location eyeLocation = p.getLocation();
  4.  
  5. double eyeX = eyeLocation.getX();
  6. double eyeY = eyeLocation.getY();
  7. double eyeZ = eyeLocation.getZ();
  8. double eyePitch = Math.toRadians(eyeLocation.getPitch());
  9. double eyeYaw = Math.toRadians(eyeLocation.getPitch() + 90.0F);
  10.  
  11. double x = Math.cos(eyeYaw) * Math.sin(eyePitch);
  12. double y = Math.sin(eyeYaw) * Math.sin(eyePitch);
  13. double z = Math.sin(eyePitch);
  14.  
  15. for(int i = 0; i <= 50; i++) {
  16. Location location = new Location(p.getWorld(), eyeX + i * x, eyeY + i * z, eyeZ + i * y);
  17. p.getWorld().playEffect(location, Effect.WATERDRIP, 1);
  18.  
  19. }
  20.  
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement