/** * The type of the species that will be used at the given position of the mutation recipe in the gui. * * @param position 0 = first parent, 1 = second parent, 2 = result */ default ISpeciesType getTypeForMutation(int position) { return getIconType(); }
@Override public ItemStack getDisplayStack(IAlleleSpecies species) { return getDisplayStack(species, root.getIconType()); } }
private static ImmutableMap<IAlleleSpecies, ItemStack> createEntries() { ImmutableMap.Builder<IAlleleSpecies, ItemStack> entries = ImmutableMap.builder(); for (ISpeciesRoot root : AlleleManager.alleleRegistry.getSpeciesRoot().values()) { for (IIndividual individual : root.getIndividualTemplates()) { IAlleleSpecies species = individual.getGenome().getPrimary(); ItemStack itemStack = root.getMemberStack(root.templateAsIndividual(root.getTemplate(species)), root.getIconType()); entries.put(species, itemStack); } } return entries.build(); } }
public static List<GenepoolRecipeWrapper> create() { List<GenepoolRecipeWrapper> recipes = new ArrayList<>(); Collection<ISpeciesRoot> roots = AlleleManager.alleleRegistry.getSpeciesRoot().values(); for (ISpeciesRoot root : roots) { ISpeciesType[] speciesTypes = root.getIconType().getClass().getEnumConstants(); IAllele[] defaultTemplate = root.getDefaultTemplate(); IIndividual individual = root.templateAsIndividual(defaultTemplate); for (ISpeciesType speciesType : speciesTypes) { ItemStack memberStack = root.getMemberStack(individual, speciesType); memberStack.setItemDamage(OreDictionary.WILDCARD_VALUE); GenepoolRecipeWrapper recipeWrapper = new GenepoolRecipeWrapper(memberStack); recipes.add(recipeWrapper); } } return recipes; } }
public GuiNaturalistInventory(ISpeciesRoot speciesRoot, EntityPlayer player, Container container, int page, int maxPages) { super(Constants.TEXTURE_PATH_GUI + "/apiaristinventory.png", container); this.speciesRoot = speciesRoot; this.pageCurrent = page; this.pageMax = maxPages; xSize = 196; ySize = 202; for (IIndividual individual : speciesRoot.getIndividualTemplates()) { iconStacks.put(individual.getIdent(), speciesRoot.getMemberStack(individual, speciesRoot.getIconType())); } breedingTracker = speciesRoot.getBreedingTracker(player.world, player.getGameProfile()); }
public SpeciesDisplayHelper(ISpeciesRoot root) { this.root = root; ISpeciesType type = root.getIconType(); for (IIndividual individual : root.getIndividualTemplates()) { ItemStack itemStack = root.getMemberStack(individual, type); iconStacks.put(type, individual.getGenome().getPrimary().getUID(), itemStack); } }
private void setTokenSpecies(String speciesUid) { IAllele allele = AlleleManager.alleleRegistry.getAllele(speciesUid); if (allele instanceof IAlleleSpecies) { IAlleleSpecies species = (IAlleleSpecies) allele; ISpeciesRoot root = species.getRoot(); IAllele[] template = root.getTemplate(species); this.tokenIndividual = root.templateAsIndividual(template); this.tokenStack = root.getMemberStack(this.tokenIndividual, root.getIconType()); } }
public static List<IsolatorRecipeWrapper> create() { List<IsolatorRecipeWrapper> recipes = new ArrayList<>(); Collection<ISpeciesRoot> roots = AlleleManager.alleleRegistry.getSpeciesRoot().values(); for (ISpeciesRoot root : roots) { ISpeciesType[] speciesTypes = root.getIconType().getClass().getEnumConstants(); IChromosomeType speciesChromosomeType = root.getSpeciesChromosomeType(); IAllele[] defaultTemplate = root.getDefaultTemplate(); IIndividual individual = root.templateAsIndividual(defaultTemplate); for (ISpeciesType speciesType : speciesTypes) { ItemStack memberStack = root.getMemberStack(individual, speciesType); memberStack.setItemDamage(OreDictionary.WILDCARD_VALUE); IAllele species = defaultTemplate[speciesChromosomeType.ordinal()]; ItemStack filledSequence = ItemSequence.create(new Gene(species, speciesChromosomeType, root), false); IsolatorRecipeWrapper recipeWrapper = new IsolatorRecipeWrapper(memberStack, filledSequence); recipes.add(recipeWrapper); } } return recipes; } }