Package net.minecraft.client.renderer.texture

Examples of net.minecraft.client.renderer.texture.TextureManager


        if (icon == null)
        {
            GL11.glPopMatrix();
            return;
        }
        TextureManager texturemanager = this.mc.getTextureManager();
        texturemanager.bindTexture(texturemanager.getResourceLocation(stack.getItemSpriteNumber()));

        if (type == ItemRenderType.EQUIPPED_FIRST_PERSON)
        {
            GL11.glTranslatef(0.6F, 0.5F, 0.5F);
        }
View Full Code Here


        if (icon == null)
        {
            GL11.glPopMatrix();
            return;
        }
        TextureManager texturemanager = Minecraft.getMinecraft().renderEngine;
        texturemanager.bindTexture(texturemanager.getResourceLocation(par1ItemStack.getItemSpriteNumber()));
        Tessellator tessellator = Tessellator.instance;
        float f = icon.getMinU();
        float f1 = icon.getMaxU();
        float f2 = icon.getMinV();
        float f3 = icon.getMaxV();
View Full Code Here

                int shifty = 35;
                String logoFile = selectedMod.getMetadata().logoFile;
                if (!logoFile.isEmpty())
                {
                    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
                    TextureManager tm = mc.getTextureManager();
                    IResourcePack pack = FMLClientHandler.instance().getResourcePackFor(selectedMod.getModId());
                    try
                    {
                        if (cachedLogo == null)
                        {
                            BufferedImage logo = null;
                            if (pack!=null)
                            {
                                logo = pack.getPackImage();
                            }
                            else
                            {
                                InputStream logoResource = getClass().getResourceAsStream(logoFile);
                                if (logoResource != null)
                                {
                                    logo = ImageIO.read(logoResource);
                                }
                            }
                            if (logo != null)
                            {
                                cachedLogo = tm.getDynamicTextureLocation("modlogo", new DynamicTexture(logo));
                                cachedLogoDimensions = new Dimension(logo.getWidth(), logo.getHeight());
                            }
                        }
                        if (cachedLogo != null)
                        {
View Full Code Here

        ticksExisted++;
    }

    public void render(float partialTicks, double x1, double y1, double z1, double x2, double y2, double z2){
        Minecraft mc = FMLClientHandler.instance().getClient();
        TextureManager textureManager = mc.renderEngine;

        double laserLength = PneumaticCraftUtils.distBetween(x1, y1, z1, x2, y2, z2);
        double laserSize = 0.4;

        GL11.glDisable(GL11.GL_LIGHTING);
        GL11.glDisable(GL11.GL_CULL_FACE);
        GL11.glEnable(GL11.GL_BLEND);
        GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);

        GL11.glTranslated(x1, y1, z1);

        double dx = x2 - x1;
        double dy = y2 - y1;
        double dz = z2 - z1;
        float f3 = MathHelper.sqrt_double(dx * dx + dz * dz);
        double rotYaw = Math.atan2(dx, dz) * 180.0D / Math.PI;
        double rotPitch = 90 - (float)(Math.atan2(dy, f3) * 180.0D / Math.PI);

        GL11.glRotated(rotYaw, 0, 1, 0);
        GL11.glRotated(rotPitch, 1, 0, 0);

        GL11.glScaled(laserSize, laserSize, laserSize);
        GL11.glTranslated(0, 0.6, 0);
        GL11.glRotated((ticksExisted + partialTicks) * 200, 0, 1, 0);

        GL11.glPushMatrix();
        GL11.glScaled(1, laserLength / laserSize, 1);

        /*   GL11.glTranslated(0, -0.01, 0);
           textureManager.bindTexture(Textures.RENDER_LASER_ANIMATION);
           renderAnimation(partialTicks, laserLength / laserSize);
           GL11.glTranslated(0, 0.01, 0);*/

        textureManager.bindTexture(Textures.RENDER_LASER);
        renderQuad(glowColor);
        textureManager.bindTexture(Textures.RENDER_LASER_OVERLAY);
        renderQuad(coreColor);
        GL11.glPopMatrix();

        GL11.glRotated(180, 1, 0, 0);
        textureManager.bindTexture(Textures.RENDER_LASER_START);
        renderQuad(glowColor);
        textureManager.bindTexture(Textures.RENDER_LASER_START_OVERLAY);
        renderQuad(coreColor);

        GL11.glDisable(GL11.GL_BLEND);
        GL11.glEnable(GL11.GL_CULL_FACE);
        GL11.glEnable(GL11.GL_LIGHTING);
View Full Code Here

TOP

Related Classes of net.minecraft.client.renderer.texture.TextureManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.