Advertisement
Guest User

Untitled

a guest
Apr 28th, 2015
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.42 KB | None | 0 0
  1.         CuboidRegion cregion = new CuboidRegion(region.getMinimumPoint(), region.getMaximumPoint());
  2.         int mobs = 0;
  3.         for(Vector2D vector : cregion.getChunks()) {
  4.             Chunk chunk = loc.getWorld().getChunkAt(vector.getBlockX(), vector.getBlockZ());
  5.             for(Entity entity : chunk.getEntities()) {
  6.                 if(rgman.getApplicableRegions(entity.getLocation()).getRegions().contains(region) && entity instanceof Animals) mobs++;
  7.             }
  8.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement