Search in sources :

Example 11 with LinkedLogisticsOrderList

use of logisticspipes.routing.order.LinkedLogisticsOrderList in project LogisticsPipes by RS485.

the class RequestMonitorPopup method drawForSreenShot.

private void drawForSreenShot(int top, int left) {
    left *= -1;
    top *= -1;
    GL11.glPushMatrix();
    GL11.glDisable(GL11.GL_DEPTH_TEST);
    GL11.glTranslated(0, 0, 100);
    Gui.drawRect(0, 0, 10000, 10000, 0xff000000);
    GL11.glColor4f(0.7F, 0.7F, 0.7F, 1.0F);
    for (int yVar = 0; yVar * 16 < height; yVar++) {
        for (int xVar = 0; xVar * 16 < width; xVar++) {
            TextureAtlasSprite icon = getTexture(Blocks.STONE);
            mc.getTextureManager().bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
            drawTexturedModalRect(xVar * 16, yVar * 16, icon, 16, 16);
        }
    }
    GL11.glTranslated(0, 0, 600);
    GL11.glDisable(GL11.GL_LIGHTING);
    GL11.glEnable(GL12.GL_RESCALE_NORMAL);
    GL11.glEnable(GL11.GL_COLOR_MATERIAL);
    GL11.glEnable(GL11.GL_DEPTH_TEST);
    GL11.glDisable(GL11.GL_TEXTURE_2D);
    LinkedLogisticsOrderList list = _table.watchedRequests.get(orderId).getValue2();
    if (!list.isEmpty()) {
        SimpleGraphics.drawVerticalLine(left + 8, top + 0, top + 17, Color.GREEN, zoom.line);
    }
    renderLinkedOrderListLines(list, left, top + 17);
    for (Float progress : list.getProgresses()) {
        int pos = (int) (29.0F * progress);
        drawProgressPoint(left + 8, top + pos, 0xff00ff00);
    }
    GL11.glEnable(GL11.GL_TEXTURE_2D);
    GL11.glDisable(GL11.GL_BLEND);
    RenderHelper.enableGUIStandardItemLighting();
    GL11.glDisable(GL11.GL_LIGHTING);
    GL11.glEnable(GL12.GL_RESCALE_NORMAL);
    GL11.glEnable(GL11.GL_COLOR_MATERIAL);
    GL11.glColor4f(0.7F, 0.7F, 0.7F, 1.0F);
    mc.getTextureManager().bindTexture(RequestMonitorPopup.achievementTextures);
    String s = Integer.toString(orderId);
    if (!list.isEmpty()) {
        drawTexturedModalRect(left - 5, top - 40 + 17, 0, 202, 26, 26);
        mc.fontRenderer.drawStringWithShadow(s, left + 9 - mc.fontRenderer.getStringWidth(s) / 2, top - 30 + 17, 16777215);
    } else {
        drawTexturedModalRect(left - 5, top - 18 + 17, 0, 202, 26, 26);
        mc.fontRenderer.drawStringWithShadow(s, left + 9 - mc.fontRenderer.getStringWidth(s) / 2, top - 18 + 10 + 17, 16777215);
    }
    renderLinkedOrderListItems(list, left, top + 17, 0, 0);
    GL11.glDisable(GL11.GL_DEPTH_TEST);
    GL11.glEnable(GL11.GL_BLEND);
    GL11.glPopMatrix();
    zLevel = 0.0F;
    GL11.glDepthFunc(GL11.GL_LEQUAL);
    GL11.glDisable(GL11.GL_DEPTH_TEST);
    GL11.glEnable(GL11.GL_TEXTURE_2D);
    GL11.glEnable(GL11.GL_DEPTH_TEST);
    GL11.glEnable(GL11.GL_LIGHTING);
    RenderHelper.disableStandardItemLighting();
}
Also used : LinkedLogisticsOrderList(logisticspipes.routing.order.LinkedLogisticsOrderList) TextureAtlasSprite(net.minecraft.client.renderer.texture.TextureAtlasSprite)

Aggregations

LinkedLogisticsOrderList (logisticspipes.routing.order.LinkedLogisticsOrderList)11 IResource (logisticspipes.request.resources.IResource)7 ArrayList (java.util.ArrayList)5 ItemResource (logisticspipes.request.resources.ItemResource)4 ItemIdentifierStack (logisticspipes.utils.item.ItemIdentifierStack)4 HashMap (java.util.HashMap)3 ItemStack (net.minecraft.item.ItemStack)3 RequestLog (logisticspipes.request.RequestLog)2 DictResource (logisticspipes.request.resources.DictResource)2 ItemIdentifier (logisticspipes.utils.item.ItemIdentifier)2 TextureAtlasSprite (net.minecraft.client.renderer.texture.TextureAtlasSprite)2 IOException (java.io.IOException)1 BitSet (java.util.BitSet)1 Collection (java.util.Collection)1 List (java.util.List)1 Locale (java.util.Locale)1 Map (java.util.Map)1 Entry (java.util.Map.Entry)1 Objects (java.util.Objects)1 Collectors (java.util.stream.Collectors)1