Advertisement
JWhy

getLocationBetween()

Apr 23rd, 2014
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.33 KB | None | 0 0
  1.     public Location getLocationBetween(Location min, Location max) {
  2.         int mid_x = (max.getBlockX() + max.getBlockX()) / 2;
  3.         int mid_y = (max.getBlockY() + max.getBlockY()) / 2;
  4.         int mid_z = (max.getBlockZ() + max.getBlockZ()) / 2;
  5.  
  6.         Location inbetween = new Location(min.getWorld(), mid_x, mid_y, mid_z);
  7.         return inbetween;
  8.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement