Advertisement
Guest User

Untitled

a guest
Dec 2nd, 2022
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.74 KB | None | 0 0
  1. int minY = -64;
  2. int maxY = 319;
  3. Bukkit.getScheduler().runTaskAsynchronously(TMProtection.PLUGIN.getPlugin(), () -> {
  4.             for (int x = 0; x < 16; x++) {
  5.                 for (int z = 0; z < 16; z++) {
  6.                     for (int y = minY; y < maxY; y++) {
  7.                         Block currentBlock = chunk.getBlock(x, y, z);
  8.                         if(currentBlock.getType().equals(Material.AIR)) continue;
  9.                         if (chunk.containsKey(currentBlock.getType().name()))
  10.                             chunk.put(currentBlock.getType().name(), chunk.get(currentBlock.getType().name()) + 1);
  11.                         else chunk.put(currentBlock.getType().name(), 1);
  12.                     }
  13.                 }
  14.             }
  15.         })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement