Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int amount = 0;
- ArrayList<Location> stones = new ArrayList<Location>;
- World w = Bukkit.getWorld("world");
- for (Chunk c : w.getLoadedChunks()) {
- int cx = c.getX() << 4;
- int cz = c.getZ() << 4;
- for (int x = cx; x < cx + 16; x++) {
- for (int z = cz; z < cz + 16; z++) {
- for (int y = 0; y < 128; y++) {
- if (w.getBlockAt(x, y, z).getType() == Material.STONE) {
- stone.add(w.getLocation());
- amount++;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement