Package buildcraft.core.fluids

Examples of buildcraft.core.fluids.Tank


  }

  @Override
  public int fill(ForgeDirection from, FluidStack resource, boolean doFill) {
    Fluid fluid = resource.getFluid();
    Tank emptyTank = null;
    for (Tank tank : fluidTanks) {
      Fluid type = tank.getFluidType();
      if (type == fluid) {
        int used = tank.fill(resource, doFill);
        if (used > 0 && doFill) {
          sendNetworkUpdate();
        }
        return used;
      } else if (emptyTank == null && tank.isEmpty()) {
        emptyTank = tank;
      }
    }
    if (emptyTank != null) {
      int used = emptyTank.fill(resource, doFill);
      if (used > 0 && doFill) {
        sendNetworkUpdate();
      }
      return used;
    }
View Full Code Here


    }

    drawBackgroundSlots();

    for (int i = 0; i < builder.fluidTanks.length; i++) {
      Tank tank = builder.fluidTanks[i];
      drawFluid(tank.getFluid(), guiLeft + 179 + 18 * i, guiTop + 145, 16, 47, tank.getCapacity());
    }
    mc.renderEngine.bindTexture(FOREGROUND_TEXTURE);
    for (int i = 0; i < builder.fluidTanks.length; i++) {
      drawTexturedModalRect(guiLeft + 179 + 18 * i, guiTop + 145, 0, 54, 16, 47);
    }
View Full Code Here

TOP

Related Classes of buildcraft.core.fluids.Tank

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.