Package net.minecraft.client.model

Examples of net.minecraft.client.model.ModelChest


    private static float[][] shifts = { { 0.3F, 0.45F, 0.3F }, { 0.7F, 0.45F, 0.3F }, { 0.3F, 0.45F, 0.7F }, { 0.7F, 0.45F, 0.7F }, { 0.3F, 0.1F, 0.3F },
            { 0.7F, 0.1F, 0.3F }, { 0.3F, 0.1F, 0.7F }, { 0.7F, 0.1F, 0.7F }, { 0.5F, 0.32F, 0.5F }, };

    public TileEntityIronChestRenderer()
    {
        model = new ModelChest();
        random = new Random();
        renderBlocks = new RenderBlocks();
        itemRenderer = new RenderItem() {
            @Override
            public byte getMiniBlockCount(ItemStack stack, byte original) {
View Full Code Here


  private static float[][] shifts = { { 0.3F, 0.45F, 0.3F }, { 0.7F, 0.45F, 0.3F }, { 0.3F, 0.45F, 0.7F }, { 0.7F, 0.45F, 0.7F }, { 0.3F, 0.1F, 0.3F },
      { 0.7F, 0.1F, 0.3F }, { 0.3F, 0.1F, 0.7F }, { 0.7F, 0.1F, 0.7F }, { 0.5F, 0.32F, 0.5F }, };

  public TileEntityColoniesChestRenderer() {
    model = new ModelChest();
    random = new Random();
    renderBlocks = new RenderBlocks();
  }
View Full Code Here

      unifyAdjacentChests((BlockChest) var10, this.world, par1TileEntityChest.xCoord, par1TileEntityChest.yCoord, par1TileEntityChest.zCoord);
      var9 = getBlockMetadata(par1TileEntityChest);
    }

    if (par1TileEntityChest.adjacentChestZNeg == null && par1TileEntityChest.adjacentChestXNeg == null) {
      ModelChest var14;

      if (par1TileEntityChest.adjacentChestXPos == null && par1TileEntityChest.adjacentChestZPosition == null) {
        var14 = this.chestModel;
        this.bindTextureByName("/item/chest.png");
      } else {
        var14 = this.largeChestModel;
        this.bindTextureByName("/item/largechest.png");
      }

      GL11.glPushMatrix();
      GL11.glEnable(GL12.GL_RESCALE_NORMAL);
      GL11.glTranslatef(par1TileEntityChest.xCoord, par1TileEntityChest.yCoord + 1.0f, par1TileEntityChest.zCoord + 1.0f);
      GL11.glScalef(1.0f, -1.0f, -1.0f);
      GL11.glTranslatef(0.5f, 0.5f, 0.5f);
      short var11 = 0;

      switch (var9) {
      case 2:
        var11 = 180;
        break;
      case 3:
        var11 = 0;
        break;
      case 4:
        var11 = 90;
        break;
      case 5:
        var11 = -90;
        break;
      }

      if (var9 == 2 && par1TileEntityChest.adjacentChestXPos != null) {
        GL11.glTranslatef(1.0f, 0.0f, 0.0f);
      }

      if (var9 == 5 && par1TileEntityChest.adjacentChestZPosition != null) {
        GL11.glTranslatef(0.0f, 0.0f, -1.0f);
      }

      GL11.glRotatef(var11, 0.0f, 1.0f, 0.0f);
      GL11.glTranslatef(-0.5f, -0.5f, -0.5f);
      float var12 = par1TileEntityChest.prevLidAngle;
      float var13;

      if (par1TileEntityChest.adjacentChestZNeg != null) {
        var13 = par1TileEntityChest.adjacentChestZNeg.prevLidAngle;

        if (var13 > var12) {
          var12 = var13;
        }
      }

      if (par1TileEntityChest.adjacentChestXNeg != null) {
        var13 = par1TileEntityChest.adjacentChestXNeg.prevLidAngle;

        if (var13 > var12) {
          var12 = var13;
        }
      }

      var12 = 1.0f - var12;
      var12 = 1.0f - var12 * var12 * var12;
      var14.chestLid.rotateAngleX = -(var12 * (float) Math.PI / 2.0f);
      var14.renderAll();
      GL11.glDisable(GL12.GL_RESCALE_NORMAL);
      GL11.glPopMatrix();
    }
  }
View Full Code Here

        if (type == ItemRenderType.INVENTORY)
        {
            int index = Math.min(Math.max(item.getItemDamage(), 0), EnumRocketType.values().length - 1);
            if (EnumRocketType.values()[index].getInventorySpace() > 3)
            {
                final ModelChest modelChest = this.chestModel;
                FMLClientHandler.instance().getClient().renderEngine.bindTexture(ItemRendererTier1Rocket.chestTexture);

                GL11.glPushMatrix();
                GL11.glDisable(GL11.GL_DEPTH_TEST);
                GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
View Full Code Here

        {
            int index = Math.min(Math.max(item.getItemDamage() >= 10 ? item.getItemDamage() - 10 : item.getItemDamage(), 0), EnumRocketType.values().length - 1);

            if (EnumRocketType.values()[index].getInventorySpace() > 3)
            {
                final ModelChest modelChest = this.chestModel;
                FMLClientHandler.instance().getClient().renderEngine.bindTexture(ItemRendererTier1Rocket.chestTexture);

                GL11.glPushMatrix();
                GL11.glDisable(GL11.GL_DEPTH_TEST);
                GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
View Full Code Here

        if (type == ItemRenderType.INVENTORY)
        {
            int index = Math.min(Math.max(item.getItemDamage(), 0), EnumRocketType.values().length - 1);
            if (EnumRocketType.values()[index].getInventorySpace() > 3)
            {
                final ModelChest modelChest = this.chestModel;
                FMLClientHandler.instance().getClient().renderEngine.bindTexture(ItemRendererTier3Rocket.chestTexture);

                GL11.glPushMatrix();
                GL11.glDisable(GL11.GL_DEPTH_TEST);
                GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
View Full Code Here

  public void renderTileEntityAt(TileEntityReinforcedChest chest, double x, double y, double z, float partialTicks) {
   
    boolean large = chest.isConnected();
    if (large && !chest.isMain()) return;
   
    ModelChest model = (large ? largeChestModel : chestModel);
    bindTexture(chest.getResource());
   
    GL11.glPushMatrix();
    GL11.glEnable(GL12.GL_RESCALE_NORMAL);
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    GL11.glTranslated(x, y, z);
   
      GL11.glPushMatrix();
      GL11.glScalef(1.0F, -1.0F, -1.0F);
      GL11.glTranslatef(0.5F, -0.5F, -0.5F);
     
      int rotation = DirectionUtils.getRotation(chest.getOrientation());
      if ((rotation == 180) && large)
        GL11.glTranslatef(1.0F, 0.0F, 0.0F);
      if ((rotation == 270) && large)
        GL11.glTranslatef(0.0F, 0.0F, -1.0F);
      GL11.glRotatef(rotation, 0.0F, 1.0F, 0.0F);
      GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
     
      float angle = chest.prevLidAngle + (chest.lidAngle - chest.prevLidAngle) * partialTicks;
      angle = 1.0F - angle;
      angle = 1.0F - angle * angle * angle;
      model.chestLid.rotateAngleX = -(float)(angle * Math.PI / 2.0);
      model.renderAll();
     
      GL11.glPopMatrix();
   
    chest.getAttachments().render(partialTicks);
   
View Full Code Here

{
    private final ModelChest modelChest;

    public ItemRendererAlchemicalChest()
    {
        modelChest = new ModelChest();
    }
View Full Code Here

TOP

Related Classes of net.minecraft.client.model.ModelChest

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.