Package net.minecraft.src

Examples of net.minecraft.src.Tessellator


      child.reset();
    }
  }

  public static int drawChildren(int sum, Tessellator tessellator) {
    Tessellator child;

    for (Iterator i$ = tessellator.children.values().iterator(); i$.hasNext(); sum += child.draw()) {
      child = (Tessellator)i$.next();
    }

    return sum;
  }
View Full Code Here


  public static void startDrawingChildren(Tessellator tessellator, int drawMode) {
    Iterator i$ = tessellator.children.values().iterator();

    while (i$.hasNext()) {
      Tessellator child = (Tessellator)i$.next();
      child.startDrawing(drawMode);
    }
  }
View Full Code Here

      GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
      GL11.glTranslatef(beastNodeX, beastNodeY, 0); // Moves texture into place
      SpoutClient.getHandle().renderEngine.bindTexture(beastNodeLogo.getTextureID());
      GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_NEAREST);
      GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_NEAREST);
      Tessellator tessellator = Tessellator.instance;
      //GL11.glScalef(0.5f, 0.5f, 0.5f);
      tessellator.startDrawingQuads();
      tessellator.addVertexWithUV(0.0D, 33, -90, 0.0D, 0.0D); // Draw corners
      tessellator.addVertexWithUV(147, 33, -90, beastNodeLogo.getWidth(), 0.0D);
      tessellator.addVertexWithUV(147, 0.0D, -90, beastNodeLogo.getWidth(), beastNodeLogo.getHeight());
      tessellator.addVertexWithUV(0.0D, 0.0D, -90, 0.0D, beastNodeLogo.getHeight());
      tessellator.draw();
      GL11.glDepthMask(true);
      GL11.glEnable(GL11.GL_DEPTH_TEST);
      GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
      GL11.glPopMatrix();
    }

    int minecraftBizX = (this.width / 2 + 30);
    int minecraftBizY = getScaledHeight(85);
    if (minecraftBizLogo != null) {
      GL11.glPushMatrix();
      GL11.glDisable(GL11.GL_DEPTH_TEST);
      GL11.glEnable(GL11.GL_BLEND);
      GL11.glDepthMask(false);
      GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
      GL11.glTranslatef(minecraftBizX, minecraftBizY, 0); // Moves texture into place
      SpoutClient.getHandle().renderEngine.bindTexture(minecraftBizLogo.getTextureID());
      GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_NEAREST);
      GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_NEAREST);
      Tessellator tessellator = Tessellator.instance;
      //GL11.glScalef(0.5f, 0.5f, 0.5f);
      tessellator.startDrawingQuads();
      tessellator.addVertexWithUV(0.0D, 33, -90, 0.0D, 0.0D); // Draw corners
      tessellator.addVertexWithUV(147, 33, -90, minecraftBizLogo.getWidth(), 0.0D);
      tessellator.addVertexWithUV(147, 0.0D, -90, minecraftBizLogo.getWidth(), minecraftBizLogo.getHeight());
      tessellator.addVertexWithUV(0.0D, 0.0D, -90, 0.0D, minecraftBizLogo.getHeight());
      tessellator.draw();
      GL11.glDepthMask(true);
      GL11.glEnable(GL11.GL_DEPTH_TEST);
      GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
      GL11.glPopMatrix();
    }

    // Draw tooltips
    if (isInBoundingRect(beastNodeX, beastNodeY, 33, 147, x, y)) {
      drawTooltip(
        "BeastNode provides high quality Minecraft and web hosting at affordable\n" +
        "prices and is generously sponsoring the Spout project with its hosting\n" +
        "& server needs. Mine, build, craft, and chat with your own high quality\n" +
        "Minecraft server with FREE mumble voice server and web hosting.", x, y);
    } else if (isInBoundingRect(minecraftBizX, minecraftBizY, 33, 147, x, y)) {
      drawTooltip(
        "Your Minecraft community in a new dimension!", x, y);
    }

    GL11.glDisable(2896 /*GL_LIGHTING*/);
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("gui/gui.png"));   
    RenderUtil.drawTexturedModalRectangle(this.width - 14, getInvertedScaledHeight(this.height), 0, 208, 16, 16, 0f);
    GL11.glDisable(2912 /*GL_FOG*/);
    GL11.glDisable(2929 /*GL_DEPTH_TEST*/);
    this.overlayBackground(0, 30, 255, 255);
    this.overlayBackground(this.height - 50, this.height, 255, 255);
    drawCenteredString(this.fontRenderer, "About", this.width / 2, 16, 0xffffff);
    Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("textures/gui/title/mojang.png"));   
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    GL11.glPushMatrix();
    GL11.glTranslatef((0.0325f * this.width), (this.height - 40), 0);
    GL11.glScalef(0.4f, 0.4f, 0.4f);
    this.drawTexturedModalRect(0, 0, 0, 0, 155, 44);
    this.drawTexturedModalRect(155, 0, 0, 45, 155, 44);
    GL11.glPopMatrix();

    if (spoutcraftTexture != null) {
      GL11.glPushMatrix();
      GL11.glDisable(GL11.GL_DEPTH_TEST);
      GL11.glDisable(GL11.GL_BLEND);
      GL11.glDepthMask(false);
      GL11.glEnable(3008 /*GL_ALPHA_TEST*/);
      GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
      GL11.glTranslatef((this.width - 140), (this.height - 45), 0); // Moves texture into place
      SpoutClient.getHandle().renderEngine.bindTexture(spoutcraftTexture.getTextureID());
      GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_NEAREST);
      GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_NEAREST);
      Tessellator tessellator = Tessellator.instance;
      tessellator.startDrawingQuads();
      tessellator.addVertexWithUV(0.0D, 32, -90, 0.0D, 0.0D); // Draw corners
      tessellator.addVertexWithUV(128, 32, -90, spoutcraftTexture.getWidth(), 0.0D);
      tessellator.addVertexWithUV(128, 0.0D, -90, spoutcraftTexture.getWidth(), spoutcraftTexture.getHeight());
      tessellator.addVertexWithUV(0.0D, 0.0D, -90, 0.0D, spoutcraftTexture.getHeight());
      tessellator.draw();
      GL11.glDepthMask(true);
      GL11.glEnable(GL11.GL_DEPTH_TEST);
      GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
      GL11.glPopMatrix();
    }

    drawString(this.fontRenderer, "Unknown Version", (int)(this.width * 0.034f), this.height - 20, 0xffffff);
    drawString(this.fontRenderer, "Copyright Mojang AB", (int)(this.width * 0.034f), this.height - 10, 0x808080);

    String version = SpoutClient.getClientVersion();
    drawString(this.fontRenderer, version, (int)(this.width - 45) - fontRenderer.getStringWidth(version) + fontRenderer.getStringWidth("0"), this.height - 20, 0xffffff);
    drawString(this.fontRenderer, "Licensed under LGPLv3", (int)(this.width - 129), this.height - 10, 0x808080);

    ((GuiButton)this.buttonList.get(0)).xPosition = this.width / 2 - 50;
    ((GuiButton)this.buttonList.get(0)).yPosition = this.height - 25;
    ((GuiButton)this.buttonList.get(0)).drawButton(this.mc, x, y);
    //super.drawScreen(x, x, z);

    // Shadow magic
    GL11.glEnable(3042 /*GL_BLEND*/);
    GL11.glBlendFunc(770, 771);
    GL11.glDisable(3008 /*GL_ALPHA_TEST*/);
    GL11.glShadeModel(7425 /*GL_SMOOTH*/);
    GL11.glDisable(3553 /*GL_TEXTURE_2D*/);
    Tessellator var16 = Tessellator.instance;
    byte var19 = 4;
    var16.startDrawingQuads();
    var16.setColorRGBA_I(0, 0);
    var16.addVertexWithUV(0, (double)(30 + var19), 0.0D, 0.0D, 1.0D);
    var16.addVertexWithUV(this.width - 12, (double)(30 + var19), 0.0D, 1.0D, 1.0D);
    var16.setColorRGBA_I(0, 255);
    var16.addVertexWithUV(this.width - 12, 30, 0.0D, 1.0D, 0.0D);
    var16.addVertexWithUV(0, 30, 0.0D, 0.0D, 0.0D);
    var16.draw();
    var16.startDrawingQuads();
    var16.setColorRGBA_I(0, 255);
    var16.addVertexWithUV(0, this.height - 50, 0.0D, 0.0D, 1.0D);
    var16.addVertexWithUV(this.width - 12, this.height - 50, 0.0D, 1.0D, 1.0D);
    var16.setColorRGBA_I(0, 0);
    var16.addVertexWithUV(this.width - 12, (double)(this.height - 50 - var19), 0.0D, 1.0D, 0.0D);
    var16.addVertexWithUV(0, (double)(this.height - 50 - var19), 0.0D, 0.0D, 0.0D);
    var16.draw();

    GL11.glEnable(3008 /*GL_ALPHA_TEST*/);

    GL11.glPopMatrix();
  }
 
View Full Code Here

    GL11.glDisable(GL11.GL_TEXTURE_2D);
    GL11.glEnable(GL11.GL_BLEND);
    GL11.glDisable(GL11.GL_ALPHA_TEST);
    GL11.glBlendFunc(770, 771);
    GL11.glShadeModel(GL11.GL_SMOOTH);
    Tessellator tessellator = Tessellator.instance;
    tessellator.startDrawingQuads();
    boolean VERT = gradient.getOrientation() == Orientation.VERTICAL;
    tessellator.setColorRGBA_F(gradient.getTopColor().getRedF(), gradient.getTopColor().getGreenF(), gradient.getTopColor().getBlueF(), gradient.getTopColor().getAlphaF());
    tessellator.addVertex((VERT ? gradient.getWidth() : 0) + gradient.getScreenX(), (VERT ? 0 : gradient.getHeight()) + gradient.getScreenY(), 0.0D);
    tessellator.addVertex(gradient.getScreenX(), gradient.getScreenY(), 0.0D);
    tessellator.setColorRGBA_F(gradient.getBottomColor().getRedF(), gradient.getBottomColor().getGreenF(), gradient.getBottomColor().getBlueF(), gradient.getBottomColor().getAlphaF());
    tessellator.addVertex((VERT ? 0 : gradient.getWidth()) + gradient.getScreenX(), (VERT ? gradient.getHeight() : 0) + gradient.getScreenY(), 0.0D);
    tessellator.addVertex(gradient.getWidth() + gradient.getScreenX(), gradient.getHeight() + gradient.getScreenY(), 0.0D);
    tessellator.draw();
    GL11.glShadeModel(GL11.GL_FLAT);
    GL11.glDisable(GL11.GL_BLEND);
    GL11.glEnable(GL11.GL_ALPHA_TEST);
    GL11.glEnable(GL11.GL_TEXTURE_2D);
  }
View Full Code Here

      tWidth = Math.min(tWidth, width);
      tHeight = Math.min(tHeight, height);
      tLeft = Math.min(Math.max(0, left), rWidth);
      tTop = Math.min(Math.max(0, top), rHeight);
    }
    Tessellator tessellator = Tessellator.instance;
    tessellator.startDrawingQuads();
    tessellator.addVertexWithUV(0.0D, height, -90, tLeft, tTop); // draw corners
    tessellator.addVertexWithUV(width, height, -90, tWidth, tTop);
    tessellator.addVertexWithUV(width, 0.0D, -90, tWidth, tHeight);
    tessellator.addVertexWithUV(0.0D, 0.0D, -90, tLeft, tHeight);
    tessellator.draw();
    GL11.glDepthMask(true);
    GL11.glEnable(GL11.GL_DEPTH_TEST);
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    GL11.glPopMatrix();
    GL11.glDisable(GL11.GL_BLEND);
View Full Code Here

      tTop = Math.min(Math.max(0, (top/(double)textureBinding.getImageHeight()) * textureBinding.getHeight()), rHeight);
    }
    tHeight = -tHeight;
    tTop = rHeight - tTop;

    Tessellator tessellator = Tessellator.instance;
    tessellator.startDrawingQuads();
    tessellator.addVertexWithUV(0.0D, height, -90, tLeft, tTop + tHeight); // draw corners
    tessellator.addVertexWithUV(width, height, -90, tLeft + tWidth, tTop + tHeight);
    tessellator.addVertexWithUV(width, 0.0D, -90, tLeft + tWidth, tTop);
    tessellator.addVertexWithUV(0.0D, 0.0D, -90, tLeft, tTop);

    tessellator.draw();
    GL11.glDepthMask(true);
    GL11.glEnable(GL11.GL_DEPTH_TEST);
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    GL11.glPopMatrix();
    if (blend && !wasBlend) {
View Full Code Here

    GL11.glPopMatrix();
  }

  private void overlayBackground(int var1, int var2, int var3, int var4) {
    Tessellator var5 = Tessellator.instance;
    //ToDo: This is the wrong location for this file.
    Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("gui/background.png"));
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    float var6 = 32.0F;
    var5.startDrawingQuads();
    var5.setColorRGBA_I(4210752, var4);
    var5.addVertexWithUV(0.0D, (double)var2, 0.0D, 0.0D, (double)((float)var2 / var6));
    var5.addVertexWithUV((double)this.width, (double)var2, 0.0D, (double)((float)this.width / var6), (double)((float)var2 / var6));
    var5.setColorRGBA_I(4210752, var3);
    var5.addVertexWithUV((double)this.width, (double)var1, 0.0D, (double)((float)this.width / var6), (double)((float)var1 / var6));
    var5.addVertexWithUV(0.0D, (double)var1, 0.0D, 0.0D, (double)((float)var1 / var6));
    var5.draw();
  }
View Full Code Here

    yaw = entityT.isRotateWithPlayer()?-this.renderManager.playerViewY:yaw;
    GL11.glTranslated(x, y, z);
    GL11.glRotatef(yaw, 0, 1.0F, 0);
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    SpoutClient.getHandle().renderEngine.bindTexture(entityT.texture.getTextureID());
    Tessellator tessellator = Tessellator.instance;
    tessellator.startDrawingQuads();
    double h = entityT.height * 0.014;
    double w = entityT.width * 0.014;
    tessellator.addVertexWithUV(w/2, -h/2, 0, 0.0D, 0.0D); // Draw corners
    tessellator.addVertexWithUV(-w/2, -h/2, 0, entityT.texture.getWidth(), 0.0D);
    tessellator.addVertexWithUV(-w/2, h/2, 0, entityT.texture.getWidth(), entityT.texture.getHeight());
    tessellator.addVertexWithUV(w/2, h/2, 0, 0.0D, entityT.texture.getHeight());
    tessellator.draw();
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    RenderHelper.enableStandardItemLighting();
    GL11.glPopMatrix();
  }
View Full Code Here

    this.depth = depth;
  }

  @Override
  public void renderIcon(int par1, int par2, Icon par3Icon, int par4, int par5) {
    Tessellator var6 = Tessellator.instance;
    var6.startDrawingQuads();
    var6.addVertexWithUV((double)(par1 + 0), (double)(par2 + par5) * height, (double)this.zLevel, (double)par3Icon.getMinU(), (double)par3Icon.getMaxV());
    var6.addVertexWithUV((double)(par1 + par4) * height, (double)(par2 + par5), (double)this.zLevel, (double)par3Icon.getMaxU(), (double)par3Icon.getMaxV());
    var6.addVertexWithUV((double)(par1 + par4) * height, (double)(par2 + 0), (double)this.zLevel, (double)par3Icon.getMaxU(), (double)par3Icon.getMinV());
    var6.addVertexWithUV((double)(par1 + 0), (double)(par2 + 0), (double)this.zLevel, (double)par3Icon.getMinU(), (double)par3Icon.getMinV());
    var6.draw();
  }
View Full Code Here

            float f8 = MathHelper.sqrt_float(f4 * f4 + f5 * f5 + f6 * f6);
            GL11.glPushMatrix();
            GL11.glTranslatef((float)d, (float)d1 + 2.0F, (float)d2);
            GL11.glRotatef(((float)(-Math.atan2(f6, f4)) * 180F) / 3.141593F - 90F, 0.0F, 1.0F, 0.0F);
            GL11.glRotatef(((float)(-Math.atan2(f7, f5)) * 180F) / 3.141593F - 90F, 1.0F, 0.0F, 0.0F);
            Tessellator tessellator = Tessellator.instance;
            RenderHelper.disableStandardItemLighting();
            GL11.glDisable(2884 /*GL_CULL_FACE*/);
            loadTexture("/mob/enderdragon/beam.png");
            GL11.glShadeModel(7425 /*GL_SMOOTH*/);
            float f9 = 0.0F - ((float)entitydragon.ticksExisted + f1) * 0.01F;
            float f10 = MathHelper.sqrt_float(f4 * f4 + f5 * f5 + f6 * f6) / 32F - ((float)entitydragon.ticksExisted + f1) * 0.01F;
            tessellator.startDrawing(5);
            int i = 8;
            for(int j = 0; j <= i; j++)
            {
               float f11 = MathHelper.sin(((float)(j % i) * 3.141593F * 2.0F) / (float)i) * 0.75F;
               float f12 = MathHelper.cos(((float)(j % i) * 3.141593F * 2.0F) / (float)i) * 0.75F;
               float f13 = ((float)(j % i) * 1.0F) / (float)i;
               tessellator.setColorOpaque_I(0);
               tessellator.addVertexWithUV(f11 * 0.2F, f12 * 0.2F, 0.0D, f13, f10);
               tessellator.setColorOpaque_I(0xffffff);
               tessellator.addVertexWithUV(f11, f12, f8, f13, f9);
            }
        
            tessellator.draw();
            GL11.glEnable(2884 /*GL_CULL_FACE*/);
            GL11.glShadeModel(7424 /*GL_FLAT*/);
            RenderHelper.enableStandardItemLighting();
            GL11.glPopMatrix();
         }
View Full Code Here

TOP

Related Classes of net.minecraft.src.Tessellator

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.