use of forestry.api.genetics.IFilterLogic in project ForestryMC by ForestryMC.
the class SpeciesWidget method draw.
@Override
public void draw(int startX, int startY) {
int x = xPos + startX;
int y = yPos + startY;
IFilterLogic logic = gui.getLogic();
IAlleleSpecies allele = (IAlleleSpecies) logic.getGenomeFilter(facing, index, active);
if (allele != null) {
GuiUtil.drawItemStack(manager.gui, ITEMS.getOrDefault(allele, ItemStack.EMPTY), x, y);
}
TextureManager textureManager = Minecraft.getMinecraft().getTextureManager();
if (this.gui.selection.isSame(this)) {
textureManager.bindTexture(SelectionWidget.TEXTURE);
gui.drawTexturedModalRect(x - 1, y - 1, 212, 0, 18, 18);
}
}
Aggregations