use of forestry.api.genetics.IAlyzerPlugin in project ForestryMC by ForestryMC.
the class GuiElementFactory method createMutationResultant.
public IGuiElementLayout createMutationResultant(int x, int y, int width, int height, IMutation mutation, IBreedingTracker breedingTracker) {
if (breedingTracker.isDiscovered(mutation)) {
IGuiElementLayout element = new GuiElementPanel(x, y, width, height);
IAlyzerPlugin plugin = mutation.getRoot().getAlyzerPlugin();
Map<String, ItemStack> iconStacks = plugin.getIconStacks();
ItemStack firstPartner = iconStacks.get(mutation.getAllele0().getUID());
ItemStack secondPartner = iconStacks.get(mutation.getAllele1().getUID());
element.addElements(new GuiElementItemStack(0, 0, firstPartner), createProbabilityAdd(mutation, 21, 4), new GuiElementItemStack(33, 0, secondPartner));
return element;
}
// Do not display secret undiscovered mutations.
if (mutation.isSecret()) {
return null;
}
return createUnknownMutationGroup(x, y, width, height, mutation);
}
Aggregations