• API
• FAQ
• Tools
• Trends
• Archive
daily pastebin goal
75%
SHARE
TWEET

# Untitled

a guest Feb 21st, 2012 21 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1.         int ncenterx = a-centerx;
2.         int ncentery = b-centery;
3.         double x2d = (a-centerx) * (a-centerx);
4.         double y2d = (b-centery) * (b-centery);
5.         double distance = (Math.sqrt(Math.abs(x2d+y2d)));
6.         double ny2;
7.         if(ncentery != 0 )
8.          {
9.                 ny2 =ncenterx/ncentery;
10.          }
11.         else
12.          {
13.                 ny2 = 0;
14.          }
15.         double tanx = Math.atan(ny2);
16.         double anglex = tanx + mc.thePlayer.rotationYaw;
17.         double rdcosx = Math.cos(anglex);
18.         double rdsinx = Math.sin(anglex);
19.         System.out.println(rdcosx + ", " + rdsinx);
20.         double rcosx = distance * rdcosx;
21.         double rsinx = distance * rdsinx;
22.         double aposx = mc.thePlayer.posX+rcosx;
23.         double aposy = mc.thePlayer.posZ+rsinx;
24.         int gbcx = (int) aposx;
25.         int gbcy = (int) aposy;
RAW Paste Data
Top