Examples of ICrop


Examples of forestry.api.farming.ICrop

    Stack<ICrop> crops = new Stack<ICrop>();

    // Determine what type we want to harvest.
    Block block = getBlock(position);

    ICrop crop = null;
    if (!block.isWood(getWorld(), position.x, position.y, position.z)) {
      crop = cocoa.getCropAt(getWorld(), position.x, position.y, position.z);
      if (crop == null)
        return crops;
    }
View Full Code Here

Examples of forestry.api.farming.ICrop

          // See whether the given position has already been processed
          if (seen.contains(candidate))
            continue;

          ICrop crop = cocoa.getCropAt(world, candidate.x, candidate.y, candidate.z);
          if (crop != null) {
            crops.push(crop);
            candidates.add(candidate);
            seen.add(candidate);
          } else if (isWoodBlock(candidate)) {
View Full Code Here

Examples of forestry.api.farming.ICrop

    Stack<ICrop> crops = new Stack<ICrop>();
    for (int i = 0; i < extent; i++) {
      Vect position = translateWithOffset(x, y + 1, z, direction, i);
      for (IFarmable seed : seeds) {
        ICrop crop = seed.getCropAt(world, position.x, position.y, position.z);
        if (crop != null)
          crops.push(crop);
      }
    }
    return crops;
View Full Code Here

Examples of forestry.api.farming.ICrop

    Stack<ICrop> crops = new Stack<ICrop>();
    for (int i = 0; i < extent; i++) {
      Vect position = translateWithOffset(x, y + 1, z, direction, i);
      for (IFarmable seed : seeds) {
        ICrop crop = seed.getCropAt(world, position.x, position.y, position.z);
        if (crop != null)
          crops.push(crop);
      }
    }
    return crops;
View Full Code Here

Examples of forestry.api.farming.ICrop

    Stack<ICrop> crops = new Stack<ICrop>();

    // Determine what type we want to harvest.
    IFarmable germling = null;
    for (IFarmable germl : germlings) {
      ICrop crop = germl.getCropAt(world, position.x, position.y, position.z);
      if (crop == null)
        continue;

      crops.push(crop);
      seen.add(position);
View Full Code Here

Examples of forestry.api.farming.ICrop

          // See whether the given position has already been processed
          if (seen.contains(candidate))
            continue;

          ICrop crop = germling.getCropAt(world, candidate.x, candidate.y, candidate.z);
          if (crop != null) {
            crops.push(crop);
            candidates.add(candidate);
            seen.add(candidate);
          }
View Full Code Here

Examples of forestry.api.farming.ICrop

    Stack<ICrop> crops = new Stack<ICrop>();
    for (int i = 0; i < extent; i++) {
      Vect position = translateWithOffset(x, y + 1, z, direction, i);
      for (IFarmable seed : germlings) {
        ICrop crop = seed.getCropAt(world, position.x, position.y, position.z);
        if (crop != null)
          crops.push(crop);
      }
    }
    return crops;
View Full Code Here

Examples of forestry.api.farming.ICrop

    Stack<ICrop> crops = new Stack<ICrop>();
    for (int i = 0; i < extent; i++) {
      Vect position = translateWithOffset(x, y + 1, z, direction, i);
      for (IFarmable farmable : germlings) {
        ICrop crop = farmable.getCropAt(world, position.x, position.y, position.z);
        if (crop != null)
          crops.push(crop);
      }

    }
View Full Code Here

Examples of forestry.api.farming.ICrop

    Stack<ICrop> crops = new Stack<ICrop>();
    for (int i = 0; i < extent; i++) {
      Vect position = translateWithOffset(x, y + 1, z, direction, i);
      for (IFarmable seed : germlings) {
        ICrop crop = seed.getCropAt(world, position.x, position.y, position.z);
        if (crop != null)
          crops.push(crop);
      }
    }
    return crops;
View Full Code Here

Examples of forestry.api.farming.ICrop

    @Override
    public ICrop getCropAt(World world, int x, int y, int z){
        if(!isSaplingAt(world, x, y, z)) return null;
        int meta = world.getBlockMetadata(x, y, z);
        return meta == 6 || meta == 13 ? new ICrop(){

            private World world;
            private int x, y, z;

            public ICrop setCoord(World world, int x, int y, int z){
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.