Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static boolean overlap(Location center) {
- int size = MainConfiguration.villageSize();
- for (Map.Entry<String, ArrayList<Location>> entry : villages.entrySet()) {
- String villageName = entry.getKey();
- int[] coords = VillageConfig.getVillageCoords(villageName)
- Location pt1 = new Location(VillageConfig.getVillageWorld(villageName), coords[0], coords[1], coords[2]);
- Location village_2_center = VillageConfig.getVillageCenterpt1(pt1);
- if(Math.abs(center.getBlockX() - village_2_center.getBlockX()) < size) return true;
- if(Math.abs(center.getBlockY() - center.getBlockY()) < size) return true;
- if(Math.abs(center.getBlockZ() - center.getBlockZ()) < size) return true;
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment