@Override protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { super.drawGuiContainerBackgroundLayer(par1, par2, par3); // arrow int m = (tile.getWorkMeter() * 24) / tile.getMaxWorkMeter(); drawTexturedModalRect(x + 84, y + 34, 176, 14, m + 1, 16); // flame int burn = (tile.getBurnTime() * 14) / (tile.getBurnItemTime() == 0 ? 1 : tile.getBurnItemTime()); GuiHelper.drawModalRectFromDown(this, x + 23, y + 18, 176, 0, 16, burn, 14); }
private void renderStatusBars() { for (int i = 0; i < this.inventorySlots.inventorySlots.size(); i++) { if (i < TileRipeningBox.RIPENING_SLOTS) { Slot slot = (Slot) this.inventorySlots.inventorySlots.get(i); int ripeningStatus = box.getRipeningStatus(i); int xPos = slot.xDisplayPosition + x; int yPos = slot.yDisplayPosition + y; if (MonnefCorePlugin.debugEnv) { String status = String.format("%d", ripeningStatus); fontRendererObj.drawString(status, xPos, yPos, 4210752); bindBackgroundTexture(); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); } int stripWidth = (ripeningStatus * STATUS_WIDTH) / TileRipeningBox.MAX_RIPENING_STATUS; int yShift = i > 3 ? (16 + STATUS_SPACE * 2) : -STATUS_HEIGHT - STATUS_SPACE; GuiHelper.drawTextureModalRect( this, xPos, yPos + yShift - 1, 176, 31, stripWidth, STATUS_HEIGHT); } } }