Guest User

Untitled

a guest
Nov 23rd, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.37 KB | None | 0 0
  1. public ChunkyCoordinates(Location location)
  2.     {
  3.         double xPos = (location.getX()/16);
  4.         double zPos = (location.getZ()/16);
  5.  
  6.         this.x = (int)xPos;
  7.         this.z = (int)zPos;
  8.  
  9.         if (xPos < 0) {
  10.             this.x--;
  11.         }
  12.  
  13.         if (zPos < 0) {
  14.             this.z--;
  15.         }
  16.         this.world = location.getWorld().getName();
  17.     }
Add Comment
Please, Sign In to add comment