Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. @Override
  2. public boolean canSpawn(World w, int x, int z) {
  3. int y = w.getHighestBlockYAt(x, z);
  4. return (w.getBlockAt(x, y, z).getType() == Material.SAND
  5. || w.getBlockAt(x, y, z).getType() == Material.GRAVEL
  6. || w.getBlockAt(x, y, z).getType() == Material.GRASS
  7. || w.getBlockAt(x, y, z).getType() == Material.STONE)
  8. && w.getBlockAt(x,y+1,z).getType() == Material.AIR
  9. && w.getBlockAt(x,y+2,z).getType() == Material.AIR;
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement