Advertisement
Guest User

Untitled

a guest
Jan 18th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. int amount = 0;
  2. ArrayList<Location> stones = new ArrayList<Location>;
  3.  
  4. World w = Bukkit.getWorld("world");
  5. for (Chunk c : w.getLoadedChunks()) {
  6. int cx = c.getX() << 4;
  7. int cz = c.getZ() << 4;
  8. for (int x = cx; x < cx + 16; x++) {
  9. for (int z = cz; z < cz + 16; z++) {
  10. for (int y = 0; y < 128; y++) {
  11. if (w.getBlockAt(x, y, z).getType() == Material.STONE) {
  12. stone.add(w.getLocation());
  13. amount++;
  14. }
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement