Package net.minecraft.client.renderer

Examples of net.minecraft.client.renderer.RenderBlocks


      if (storedFluid != null && storedFluid.getFluid() != null)
      {
        Icon fluidIcon = storedFluid.getFluid().getIcon();

        Tessellator tessellator = Tessellator.instance;
        RenderBlocks renderer = new RenderBlocks();

        GL11.glScalef(1.0F, 1.0F, -1.0F);
        renderer.setRenderBounds(0.08F, 0.001F, 0.08F, 0.92, (float) storedFluid.amount / (float) tankCapacity * 0.999F, 0.92F);
        Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
        GL11.glTranslatef(-0.5F, -0.5F, -0.5F);

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

        tessellator.startDrawingQuads();
        tessellator.setNormal(0.0F, -1F, 0.0F);
        renderer.renderFaceYNeg(Block.blocksList[FluidRegistry.WATER.getBlockID()], 0.0D, 0.0D, 0.0D, fluidIcon);
        tessellator.draw();
        tessellator.startDrawingQuads();
        tessellator.setNormal(0.0F, 1.0F, 0.0F);
        renderer.renderFaceYPos(Block.blocksList[FluidRegistry.WATER.getBlockID()], 0.0D, 0.0D, 0.0D, fluidIcon);
        tessellator.draw();
        tessellator.startDrawingQuads();
        tessellator.setNormal(0.0F, 0.0F, -1F);
        renderer.renderFaceZNeg(Block.blocksList[FluidRegistry.WATER.getBlockID()], 0.0D, 0.0D, 0.0D, fluidIcon);
        tessellator.draw();
        tessellator.startDrawingQuads();
        tessellator.setNormal(0.0F, 0.0F, 1.0F);
        renderer.renderFaceZPos(Block.blocksList[FluidRegistry.WATER.getBlockID()], 0.0D, 0.0D, 0.0D, fluidIcon);
        tessellator.draw();
        tessellator.startDrawingQuads();
        tessellator.setNormal(-1F, 0.0F, 0.0F);
        renderer.renderFaceXNeg(Block.blocksList[FluidRegistry.WATER.getBlockID()], 0.0D, 0.0D, 0.0D, fluidIcon);
        tessellator.draw();
        tessellator.startDrawingQuads();
        tessellator.setNormal(1.0F, 0.0F, 0.0F);
        renderer.renderFaceXPos(Block.blocksList[FluidRegistry.WATER.getBlockID()], 0.0D, 0.0D, 0.0D, fluidIcon);
        tessellator.draw();

        GL11.glPopAttrib();
      }
    }
View Full Code Here


    public TileEntityIronChestRenderer()
    {
        model = new ModelChest();
        random = new Random();
        renderBlocks = new RenderBlocks();
        itemRenderer = new RenderItem() {
            @Override
            public byte getMiniBlockCount(ItemStack stack, byte original) {
                return SignedBytes.saturatedCast(Math.min(stack.stackSize / 32, 15) + 1);
            }
View Full Code Here

    if(type == ItemRenderType.ENTITY) {
      GL11.glPushMatrix();
      GL11.glScalef(0.5f, 0.5f, 0.5f);
    }

    RenderBlocks rb = (RenderBlocks) data[0];
    rb.setOverrideBlockTexture(EnderIO.itemBrokenSpawner.getIconFromDamage(0));
    rb.renderBlockAsItem(Blocks.stone, 0, 1);
    rb.setOverrideBlockTexture(null);

    if(type == ItemRenderType.ENTITY) {
      GL11.glPopMatrix();
    }
View Full Code Here

  }

  @Override
  public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
    if(type == ItemRenderType.INVENTORY) {
      RenderBlocks renderBlocks = (RenderBlocks) data[0];
      renderToInventory(item, renderBlocks);
    } else if(type == ItemRenderType.EQUIPPED || type == ItemRenderType.EQUIPPED_FIRST_PERSON) {
      renderEquipped(item, (RenderBlocks) data[0]);
    } else if(type == ItemRenderType.ENTITY) {
      renderEntity(item, (RenderBlocks) data[0]);
View Full Code Here

    return true;
  }

  @Override
  public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
    RenderBlocks renderBlocks = (RenderBlocks) data[0];
    if(type == ItemRenderType.INVENTORY) {
      renderToInventory(item, renderBlocks);
    } else if(type == ItemRenderType.EQUIPPED) {
      renderEquipped(item, renderBlocks);
    } else if(type == ItemRenderType.ENTITY) {
View Full Code Here

    return true;
  }

  @Override
  public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
    RenderBlocks renderBlocks = (RenderBlocks) data[0];
    if(type == ItemRenderType.INVENTORY) {
      renderToInventory(item, renderBlocks);
    } else if(type == ItemRenderType.EQUIPPED) {
      renderEquipped(item, renderBlocks);
    } else if(type == ItemRenderType.ENTITY) {
View Full Code Here

    GL11.glColor4d(this.particleRed, this.particleGreen, this.particleBlue, op * 2);

    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240.0F, 240.0F);
    RenderUtility.enableBlending();
    RenderUtility.setTerrainTexture();
    RenderUtility.renderNormalBlockAsItem(ModularForceFieldSystem.blockForceField, 0, new RenderBlocks());
    RenderUtility.disableBlending();
    GL11.glPopMatrix();

    tessellator.startDrawingQuads();
    FMLClientHandler.instance().getClient().renderEngine.bindTexture(RenderUtility.PARTICLE_RESOURCE);
View Full Code Here

  }

  @Override
  public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
    if(type == ItemRenderType.INVENTORY) {
      RenderBlocks renderBlocks = (RenderBlocks) data[0];
      renderToInventory(item, renderBlocks);
    } else if(type == ItemRenderType.EQUIPPED || type == ItemRenderType.EQUIPPED_FIRST_PERSON) {
      renderEquipped(item, (RenderBlocks) data[0]);
    } else if(type == ItemRenderType.ENTITY) {
      renderEntity(item, (RenderBlocks) data[0]);
View Full Code Here

    GL11.glColor4d(this.particleRed, this.particleGreen, this.particleBlue, op * 2);

    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240.0F, 240.0F);
    RenderUtility.enableBlending();
    RenderUtility.setTerrainTexture();
    RenderUtility.renderNormalBlockAsItem(ModularForceFieldSystem.blockForceField, 0, new RenderBlocks());
    RenderUtility.disableBlending();
    GL11.glPopMatrix();

    tessellator.startDrawingQuads();
    FMLClientHandler.instance().getClient().renderEngine.bindTexture(RenderUtility.PARTICLE_RESOURCE);
View Full Code Here

    GL11.glColor4d(this.particleRed, this.particleGreen, this.particleBlue, op * 2);

    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240.0F, 240.0F);
    RenderUtility.enableBlending();
    RenderUtility.setTerrainTexture();
    RenderUtility.renderNormalBlockAsItem(ModularForceFieldSystem.blockForceField, 0, new RenderBlocks());
    RenderUtility.disableBlending();
    GL11.glPopMatrix();

    tessellator.startDrawingQuads();
    FMLClientHandler.instance().getClient().renderEngine.bindTexture(RenderUtility.PARTICLE_RESOURCE);
View Full Code Here

TOP

Related Classes of net.minecraft.client.renderer.RenderBlocks

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.