Package org.bukkit.material

Examples of org.bukkit.material.LongGrass


            double density = biomesFernDensity.get(biome);
            if (random.nextFloat() < density) {
                species = GrassSpecies.FERN_LIKE;
            }
        }
        final LongGrass grass = new LongGrass(species);

        for (int i = 0; i < 128; i++) {
            int x = sourceX + random.nextInt(8) - random.nextInt(8);
            int z = sourceZ + random.nextInt(8) - random.nextInt(8);
            int y = sourceY + random.nextInt(4) - random.nextInt(4);
View Full Code Here


 
  protected void setCoverage(WorldGenerator generator, SupportChunk chunk, int x, int y, int z, CoverageType coverageType) {
    switch (coverageType) {
    case GRASS:
      chunk.setBlockIfNot(x, y - 1, z, Material.GRASS, Material.DIRT, Material.SOIL);
      chunk.setBlock(x, y, z, Material.LONG_GRASS, new LongGrass(GrassSpecies.NORMAL)); //TODO: Bukkit type mismatch/missing
      break;
    case FERN:
      chunk.setBlockIfNot(x, y - 1, z, Material.GRASS, Material.DIRT, Material.SOIL);
      chunk.setBlock(x, y, z, Material.LONG_GRASS, new LongGrass(GrassSpecies.FERN_LIKE));
      break;
    case DEAD_GRASS:
      chunk.setBlockIfNot(x, y - 1, z, Material.GRASS, Material.DIRT, Material.SOIL);
      chunk.setBlock(x, y, z, Material.LONG_GRASS, new LongGrass(GrassSpecies.DEAD));
      break;
    case CACTUS:
      chunk.setBlockIfNot(x, y - 1, z, Material.SAND);
      chunk.setBlocks(x, y, y + odds.getRandomInt(3) + 2, z, Material.CACTUS);
      break;
View Full Code Here

          TreeSpecies species = parseTreeSpecies(text, null);
          if (species == null)
            return def;
          tdat.setSpecies(species);
        } else if (dat instanceof LongGrass) {
          LongGrass ldat = (LongGrass) dat;
          GrassSpecies species = parseEnum(GrassSpecies.class, text, null);
          if (species == null)
            return def;
          ldat.setSpecies(species);
        } else {
          return def;
        }
        return MaterialUtil.getRawData(dat);
      }
View Full Code Here

TOP

Related Classes of org.bukkit.material.LongGrass

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.