use of binnie.botany.api.genetics.EnumFlowerChromosome in project Binnie by ForestryMC.
the class FlowerAlyzerPlugin method drawAnalyticsPage2.
@SideOnly(Side.CLIENT)
@Override
public void drawAnalyticsPage2(GuiScreen gui, ItemStack itemStack) {
lastTopOffset = 0;
guiLeft = (gui.width - 246) / 2;
guiTop = (gui.height - 238) / 2;
IFlower flower = BotanyAPI.flowerRoot.getMember(itemStack);
if (flower == null) {
return;
}
for (EnumFlowerChromosome chromosome : secondPageColorChromosome) {
drawChromosome(gui, chromosome, flower);
RenderUtil.drawSolidRect(new Area(guiLeft + COLUMN_1, guiTop + lastTopOffset + MARGIN, 50, 10), ((IAlleleInteger) flower.getGenome().getActiveAllele(chromosome)).getValue());
RenderUtil.drawSolidRect(new Area(guiLeft + COLUMN_2, guiTop + lastTopOffset + MARGIN, 50, 10), ((IAlleleInteger) flower.getGenome().getInactiveAllele(chromosome)).getValue());
newLine();
}
for (EnumFlowerChromosome chromosome : secondPageToleranceChromosome) {
drawChromosome(gui, chromosome, flower);
newLine();
}
}
use of binnie.botany.api.genetics.EnumFlowerChromosome in project Binnie by ForestryMC.
the class FlowerAlyzerPlugin method drawAnalyticsPage1.
@SideOnly(Side.CLIENT)
@Override
public void drawAnalyticsPage1(GuiScreen gui, ItemStack itemStack) {
lastTopOffset = 10;
guiLeft = (gui.width - 246) / 2;
guiTop = (gui.height - 238) / 2;
IFlower flower = BotanyAPI.flowerRoot.getMember(itemStack);
if (flower == null) {
return;
}
ItemStack renderP = getIconStacks().get(flower.getGenome().getPrimary().getUID());
ItemStack renderS = getIconStacks().get(flower.getGenome().getSecondary().getUID());
gui.mc.fontRenderer.drawString("Active", guiLeft + 10 + COLUMN_1, guiTop + 10, 0xffffff);
gui.mc.fontRenderer.drawString("Inactive", guiLeft + 10 + COLUMN_2, guiTop + 10, 0xffffff);
if (renderP != null && renderS != null) {
RenderItem itemRender = Minecraft.getMinecraft().getRenderItem();
itemRender.renderItemAndEffectIntoGUI(renderP, guiLeft + 10 + COLUMN_1, guiTop + 10 + 12);
itemRender.renderItemOverlayIntoGUI(gui.mc.fontRenderer, renderP, guiLeft + 10 + COLUMN_1, guiTop + 10 + 12, null);
itemRender.renderItemAndEffectIntoGUI(renderS, guiLeft + 10 + COLUMN_2, guiTop + 10 + 12);
itemRender.renderItemOverlayIntoGUI(gui.mc.fontRenderer, renderS, guiLeft + 10 + COLUMN_1, guiTop + 10 + 12, null);
}
guiTop += ROW_SIZE * 3;
for (EnumFlowerChromosome chromosom : firstPageChromosome) {
drawChromosome(gui, chromosom, flower);
}
}
Aggregations