Package forestry.arboriculture.genetics

Examples of forestry.arboriculture.genetics.Tree


    treeInterface.registerTemplate(TreeTemplates.getPapayaTemplate());
    treeInterface.registerTemplate(TreeTemplates.getDateTemplate());
  }

  private void registerErsatzGenomes() {
    AlleleManager.ersatzSpecimen.put(new ItemStack(Blocks.leaves, 1, 0), new Tree(
        TreeTemplates.templateAsGenome(TreeTemplates.getOakTemplate())));
    AlleleManager.ersatzSpecimen.put(new ItemStack(Blocks.leaves, 1, 1), new Tree(
        TreeTemplates.templateAsGenome(TreeTemplates.getSpruceTemplate())));
    AlleleManager.ersatzSpecimen.put(new ItemStack(Blocks.leaves, 1, 2), new Tree(
        TreeTemplates.templateAsGenome(TreeTemplates.getBirchTemplate())));
    AlleleManager.ersatzSpecimen.put(new ItemStack(Blocks.leaves, 1, 3), new Tree(
        TreeTemplates.templateAsGenome(TreeTemplates.getJungleTemplate())));

    AlleleManager.ersatzSaplings.put(new ItemStack(Blocks.sapling, 1, 0), new Tree(
        TreeTemplates.templateAsGenome(TreeTemplates.getOakTemplate())));
    AlleleManager.ersatzSaplings.put(new ItemStack(Blocks.sapling, 1, 1), new Tree(
        TreeTemplates.templateAsGenome(TreeTemplates.getSpruceTemplate())));
    AlleleManager.ersatzSaplings.put(new ItemStack(Blocks.sapling, 1, 2), new Tree(
        TreeTemplates.templateAsGenome(TreeTemplates.getBirchTemplate())));
    AlleleManager.ersatzSaplings.put(new ItemStack(Blocks.sapling, 1, 3), new Tree(
        TreeTemplates.templateAsGenome(TreeTemplates.getJungleTemplate())));
    AlleleManager.ersatzSaplings.put(new ItemStack(Blocks.sapling, 1, 4), new Tree(
        TreeTemplates.templateAsGenome(TreeTemplates.getAcaciaTemplate())));
    AlleleManager.ersatzSaplings.put(new ItemStack(Blocks.sapling, 1, 5), new Tree(
        TreeTemplates.templateAsGenome(TreeTemplates.getDarkOakTemplate())));
  }
View Full Code Here


      ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(this.getTreeItemFromTemplate(TreeTemplates.getLimeTemplate(), EnumGermlingType.POLLEN), 1, 2, 3));
    }
  }

  private ItemStack getTreeItemFromTemplate(IAllele[] template, EnumGermlingType type) {
    ITree tree = new Tree(PluginArboriculture.treeInterface.templateAsGenome(template));
    ItemStack treeItem;
    switch (type) {
    default:
    case POLLEN:
      treeItem = ForestryItem.pollenFertile.getItemStack();
      break;
    case SAPLING:
      treeItem = ForestryItem.sapling.getItemStack();
    }
    NBTTagCompound nbtTagCompound = new NBTTagCompound();
    tree.writeToNBT(nbtTagCompound);
    treeItem.setTagCompound(nbtTagCompound);
    return treeItem;
  }
View Full Code Here

      default:
    }
  }

  private ITree getTree(ItemStack itemStack) {
    return new Tree(itemStack.getTagCompound());
  }
View Full Code Here

  @Override
  public void readFromNBT(NBTTagCompound nbttagcompound) {
    super.readFromNBT(nbttagcompound);

    if (nbttagcompound.hasKey("ContainedTree"))
      containedTree = new Tree(nbttagcompound.getCompoundTag("ContainedTree"));
    if (nbttagcompound.hasKey("owner")) {
      owner = NBTUtil.func_152459_a(nbttagcompound.getCompoundTag("owner"));
    }

  }
View Full Code Here

      return PluginArboriculture.proxy.getFoliageColorBasic();
    return tree.getGenome().getPrimary().getLeafColour(tree);
  }

  private ITree getTree(ItemStack itemStack) {
    return new Tree(itemStack.getTagCompound());
  }
View Full Code Here

    setCreativeTab(Tabs.tabArboriculture);
  }

  @Override
  protected IIndividual getIndividual(ItemStack itemstack) {
    return new Tree(itemstack.getTagCompound());
  }
View Full Code Here

TOP

Related Classes of forestry.arboriculture.genetics.Tree

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.