@Override public void drawBackground() { BasicGuiUtils.drawGuiBox(0, 0, xSize, ySize, zLevel); BasicGuiUtils.drawPlayerInventoryBackground(mc, 8, 84); fontRenderer.drawString("Extension ID:", 10, 10, 0xff000000); int i = 0; for (String s : id.split("-")) fontRenderer.drawString(s, 10, 25 + 10 * i++, 0xff000000); BasicGuiUtils.drawSlotBackground(mc, 133, 19); BasicGuiUtils.drawSlotBackground(mc, 133, 49); CCRenderState.changeTexture(RL_extras); drawTexturedModalRect(134, 20, 1, 11, 16, 16); }
@Override public void renderDynamic( TubeDefinition type, ITube tube, World world, int x, int y, int z, float frameTime) { FluidStack fluid = ((TankTube) tube).getFluid(); if (fluid != null) { GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glColor4f(1, 1, 1, 1); GL11.glDisable(GL11.GL_LIGHTING); mRender.resetTransform(); mRender.enableNormals = false; mRender.setLightingFromBlock(world, x, y, z); mRender.resetTextureFlip(); mRender.resetTextureRotation(); mRender.setLocalLights(1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f); GL11.glPushMatrix(); GL11.glTranslatef(x, y, z); CCRenderState.changeTexture( Minecraft.getMinecraft() .renderEngine .getResourceLocation(fluid.getFluid().getSpriteNumber())); mRender.setIcon(fluid.getFluid().getIcon(fluid)); float amount = fluid.amount / 1000f; if (amount > 1) amount = 1; Tessellator tes = Tessellator.instance; tes.startDrawingQuads(); mRender.drawBox(63, 0.188f, 0.188f, 0.188f, 0.812f, 0.188f + (0.624f * amount), 0.812f); tes.draw(); GL11.glPopMatrix(); GL11.glDisable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_LIGHTING); } super.renderDynamic(type, tube, world, x, y, z, frameTime); }
public static void changeTexture(ResourceLocation r) { CCRenderState.changeTexture(r); }
public static void changeTexture(String s) { CCRenderState.changeTexture(s); }