Package net.minecraftforge.liquids

Examples of net.minecraftforge.liquids.LiquidStack


  }
 
  @Override
  protected void drawTank(int xOffset, int yOffset, int liquidId, int liquidMeta, int level)
  {
    LiquidStack stack = LiquidDictionary.getCanonicalLiquid(new LiquidStack(liquidId, 1, liquidMeta));
   
    if(liquidId <= 0 || stack == null)
    {
      return;
    }
   
    int vertOffset = 0;
   
    while(level > 0)
    {
      int texHeight = 0;
     
      if(level > 16)
      {
        texHeight = 16;
        level -= 16;
      }
      else
      {
        texHeight = level;
        level = 0;
      }
     
      mc.renderEngine.bindTexture(stack.getTextureSheet());
      drawTexturedModelRectFromIcon(xOffset, yOffset - texHeight - vertOffset, stack.getRenderingIcon(), 16, texHeight);
      vertOffset = vertOffset + 16;
    }
   
    this.mc.renderEngine.bindTexture(MineFactoryReloadedCore.guiFolder + _tileEntity.getGuiBackground());
    this.drawTexturedModalRect(xOffset, yOffset - 33, 232, 0, 16, 33);
View Full Code Here


    if(_tank.getLiquid() != null && _tank.getCapacity() - _tank.getLiquid().amount < _liquidFabPerTick)
    {
      return false;
    }
   
    _tank.fill(new LiquidStack(_liquidId, _liquidFabPerTick), true);
   
    return true;
  }
View Full Code Here

  public void detectAndSendChanges()
  {
    super.detectAndSendChanges();
    int tankIndex = (int)(_crafter.worldObj.getWorldTime() % 9);
    ILiquidTank tank = _crafter.getTanks(ForgeDirection.UNKNOWN)[tankIndex];
    LiquidStack l = tank.getLiquid();
   
    for(int i = 0; i < crafters.size(); i++)
    {
      ((ICrafting)crafters.get(i)).sendProgressBarUpdate(this, 0, tankIndex);
      if(l != null)
View Full Code Here

    if(var == 0) _tempTankIndex = value;
    else if(var == 1) _tempLiquidId = value;
    else if(var == 2) _tempLiquidMeta = value;
    else if(var == 3)
    {
      ((LiquidTank)_crafter.getTanks(ForgeDirection.UNKNOWN)[_tempTankIndex]).setLiquid(new LiquidStack(_tempLiquidId, value, _tempLiquidMeta));
    }
  }
View Full Code Here

  {
    super.updateProgressBar(var, value);
   
    if(var == 3) _tankAmount = value;
    else if(var == 4) _tankId = value;
    else if(var == 5) ((LiquidTank)_te.getTank()).setLiquid(new LiquidStack(_tankId, _tankAmount, value));
  }
View Full Code Here

    drawRect(xOffset, yOffset - size, xOffset + 8, yOffset, color);
  }
 
  protected void drawTank(int xOffset, int yOffset, int liquidId, int liquidMeta, int level)
  {
    LiquidStack stack = LiquidDictionary.getCanonicalLiquid(new LiquidStack(liquidId, 1, liquidMeta));
   
    if(liquidId <= 0 || stack == null)
    {
      return;
    }
   
    ItemStack itemStack = stack.asItemStack();
   
    Icon icon = stack.getRenderingIcon();
    if (icon == null)
    {
      try
      {
        icon = itemStack.getIconIndex();
      }
      catch (Throwable _) {}
      if (icon == null)
        icon = Block.lavaMoving.getIcon(0, 0);
    }
   
    int vertOffset = 0;
   
    while(level > 0)
    {
      int texHeight = 0;
     
      if(level > 16)
      {
        texHeight = 16;
        level -= 16;
      }
      else
      {
        texHeight = level;
        level = 0;
      }
     
      mc.renderEngine.bindTexture(stack.getTextureSheet());
      drawTexturedModelRectFromIcon(xOffset, yOffset - texHeight - vertOffset, icon, 16, texHeight);
      vertOffset = vertOffset + 16;
    }
   
    this.mc.renderEngine.bindTexture(MineFactoryReloadedCore.guiFolder + _tileEntity.getGuiBackground());
View Full Code Here

TOP

Related Classes of net.minecraftforge.liquids.LiquidStack

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.