Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public ArrayList<Location> getWalls(Location loc, double x, double y, double z) {
- ArrayList<Location> locs = new ArrayList<>();
- for (double ly = -y; ly <= y; ly++) {
- for (double lx = -x; lx <= x; lx++) {
- for (double lz = -z; lz <= z; lz++) {
- if (lx == -x || lx == x || ly == -y || ly == y || lz == -z || lz == z) {
- Location newloc = new Location(loc.getWorld(), loc.getX() + lx, loc.getY() + ly,
- loc.getZ() + lz);
- locs.add(newloc);
- }
- }
- }
- }
- return locs;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement