Package forestry.api.arboriculture

Examples of forestry.api.arboriculture.IAlleleTreeSpecies


    return germling.copy().tryPlaceItemIntoWorld(player, world, x, y - 1, z, 1, 0, 0, 0);
  }

  @Override
  public boolean isGermling(ItemStack itemstack) {
    IAlleleTreeSpecies tree = TreeGenome.getSpecies(itemstack);
    return tree != null;
  }
View Full Code Here


    if (modelId != this.getRenderId())
      return false;

    TileSapling tile = BlockSapling.getSaplingTile(world, x, y, z);

    IAlleleTreeSpecies species = (IAlleleTreeSpecies) PluginArboriculture.treeInterface.getDefaultTemplate()[0];
    if (tile == null || tile.getTree() == null)
      return true;
    species = tile.getTree().getGenome().getPrimary();

    renderCrossedSquares(species, world, block, x, y, z);
View Full Code Here

      list.add("<" + StringUtil.localize("gui.unknown") + ">");
      return;
    }

    // You analyzed it? Juicy tooltip coming up!
    IAlleleTreeSpecies primary = genome.getPrimary();
    IAlleleTreeSpecies secondary = genome.getSecondary();
    if (!isPureBred(EnumTreeChromosome.SPECIES))
      list.add("\u00A79" + StringUtil.localize("trees.hybrid").replaceAll("%PRIMARY",primary.getName()).replaceAll("%SECONDARY",secondary.getName()));
    list.add(String.format("\u00A76S: %s, \u00A7cM: %s", genome.getActiveAllele(EnumTreeChromosome.SAPPINESS.ordinal()).getName(), genome.getActiveAllele(EnumTreeChromosome.MATURATION.ordinal()).getName()));
    list.add(String.format("\u00A7dH: %s, \u00A7bG: %sx%s", genome.getActiveAllele(EnumTreeChromosome.HEIGHT.ordinal()).getName(), genome.getGirth(), genome.getGirth()));

    list.add(String.format("\u00A7eS: %s, \u00A7fY: %s", genome.getActiveAllele(EnumTreeChromosome.FERTILITY.ordinal()).getName(), genome.getActiveAllele(EnumTreeChromosome.YIELD.ordinal()).getName()));
View Full Code Here

  protected IAlleleTreeSpecies getSpecies(ItemStack itemStack) {
    return TreeGenome.getSpecies(itemStack);
  }

  private IAlleleTreeSpecies getSpeciesOrDefault(ItemStack itemstack) {
    IAlleleTreeSpecies treeSpecies = TreeGenome.getSpecies(itemstack);
    if (treeSpecies == null)
      treeSpecies = (IAlleleTreeSpecies) PluginArboriculture.treeInterface.getDefaultTemplate()[EnumTreeChromosome.SPECIES.ordinal()];

    return treeSpecies;
  }
View Full Code Here

  }

  @Override
  @SideOnly(Side.CLIENT)
  public IIcon getIcon(ItemStack itemstack, int renderPass) {
    IAlleleTreeSpecies species = getSpeciesOrDefault(itemstack);
    return species.getGermlingIcon(type, renderPass);
  }
View Full Code Here

TOP

Related Classes of forestry.api.arboriculture.IAlleleTreeSpecies

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.