Package org.bukkit.material

Examples of org.bukkit.material.Crops


        blockState.setMetadata(mcMMO.greenThumbDataKey, new FixedMetadataValue(mcMMO.p, (int) (System.currentTimeMillis() / Misc.TIME_CONVERSION_FACTOR)));

        switch (blockState.getType()) {
            case CROPS:
                Crops crops = (Crops) blockState.getData();

                if (greenTerra) {
                    crops.setState(CropState.MEDIUM);
                }
                else {
                    switch (greenThumbStage) {
                        case 4:
                            crops.setState(CropState.SMALL);
                            break;
                        case 3:
                            crops.setState(CropState.VERY_SMALL);
                            break;
                        case 2:
                            crops.setState(CropState.GERMINATED);
                            break;
                        default:
                            crops.setState(CropState.SEEDED);
                            break;
                    }
                }

                return true;
View Full Code Here


      generator.treeProvider.generateNormalTree(generator, chunk, x, y, z, TreeType.ACACIA);
      break;
     
    case WHEAT:
      chunk.setBlockIfNot(x, y - 1, z, Material.SOIL);
      chunk.setBlock(x, y, z, Material.CROPS, new Crops(getRandomWheatGrowth())); //TODO: Bukkit type mismatch/missing
      break;
    case CARROTS:
      chunk.setBlockIfNot(x, y - 1, z, Material.SOIL);
      BlackMagic.setBlock(chunk, x, y, z, Material.CARROT, getRandomCarrotGrowth()); //TODO: Bukkit missing proper MaterialData
      break;
View Full Code Here

TOP

Related Classes of org.bukkit.material.Crops

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.