Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2018
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. for (double x = all.getLocation().getX() - 4; x < all.getLocation().getX() + 4; x++) {
  2. for (double z = all.getLocation().getZ() - 4; z < all.getLocation().getZ() + 4; z++) {
  3. Location location = new Location(all.getWorld(), x, all.getLocation().getY() + 10, z);
  4. blocks.clear();
  5. blocks.add(all.getWorld().getBlockAt(location));
  6. Random random = new Random();
  7. Block block = blocks.get(random.nextInt(blocks.size()));
  8. block.getWorld().spawnEntity(block.getLocation(), EntityType.PRIMED_TNT);
  9. }
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement