Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public boolean canSpawn(World w, int x, int z) {
- int y = w.getHighestBlockYAt(x, z);
- return (w.getBlockAt(x, y, z).getType() == Material.SAND
- || w.getBlockAt(x, y, z).getType() == Material.GRAVEL
- || w.getBlockAt(x, y, z).getType() == Material.GRASS
- || w.getBlockAt(x, y, z).getType() == Material.STONE)
- && w.getBlockAt(x,y+1,z).getType() == Material.AIR
- && w.getBlockAt(x,y+2,z).getType() == Material.AIR;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement