Examples of canFill()


Examples of crazypants.enderio.conduit.liquid.ILiquidConduit.canFill()

  @Override
  public boolean canFill(ForgeDirection from, Fluid fluid) {
    ILiquidConduit lc = getConduit(ILiquidConduit.class);
    if(lc != null) {
      return lc.canFill(from, fluid);
    }
    return false;
  }

  @Override
View Full Code Here

Examples of erogenousbeef.bigreactors.common.multiblock.helpers.CoolantContainer.canFill()

    if(!isConnected() || from != getOutwardsDir()) { return false; }

    if(!inlet) { return false; } // Prevent pipes from filling up the output tank inadvertently

    CoolantContainer cc = getReactorController().getCoolantContainer();
    return cc.canFill(getConnectedTank(), fluid);
  }

  @Override
  public boolean canDrain(ForgeDirection from, Fluid fluid) {
    if(!isConnected() || from != getOutwardsDir()) { return false; }
View Full Code Here

Examples of forestry.core.fluids.TankManager.canFill()

  public boolean canFill(ForgeDirection from, Fluid fluid) {
    TankManager tankManager = getTankManager();
    if (tankManager == null)
      return true;

    return tankManager.canFill(from, fluid);
  }

  @Override
  public boolean canDrain(ForgeDirection from, Fluid fluid) {
    TankManager tankManager = getTankManager();
View Full Code Here

Examples of net.minecraftforge.fluids.IFluidHandler.canFill()

    if(!(te instanceof IFluidHandler)) {
      return false;
    }
    IFluidHandler fh = (IFluidHandler) te;
    ForgeDirection dir = ForgeDirection.getOrientation(side);
    if(!fh.canFill(dir, EnderIO.fluidXpJuice)) {
      return false;
    }

    int fluidVolume = XpUtil.experienceToLiquid(XpUtil.getPlayerXP(player));
    FluidStack fs = new FluidStack(EnderIO.fluidXpJuice, fluidVolume);
View Full Code Here

Examples of net.minecraftforge.fluids.IFluidHandler.canFill()

    if(tank.getFluidAmount() > 0) {

      BlockCoord loc = getLocation().getLocation(dir);
      IFluidHandler target = FluidUtil.getFluidHandler(worldObj, loc);
      if(target != null) {
        if(target.canFill(dir.getOpposite(), tank.getFluid().getFluid())) {
          FluidStack push = tank.getFluid().copy();
          push.amount = Math.min(push.amount, IO_MB_TICK);
          int filled = target.fill(dir.getOpposite(), push, true);
          if(filled > 0) {
            tank.drain(filled, true);
View Full Code Here

Examples of net.minecraftforge.fluids.IFluidHandler.canFill()

    if(outputTank.getFluidAmount() > 0) {

      BlockCoord loc = getLocation().getLocation(dir);
      IFluidHandler target = FluidUtil.getFluidHandler(worldObj, loc);
      if(target != null) {
        if(target.canFill(dir.getOpposite(), outputTank.getFluid().getFluid())) {
          FluidStack push = outputTank.getFluid().copy();
          push.amount = Math.min(push.amount, IO_MB_TICK);
          int filled = target.fill(dir.getOpposite(), push, true);
          if(filled > 0) {
            outputTank.drain(filled, true);
View Full Code Here

Examples of net.minecraftforge.fluids.IFluidHandler.canFill()

   
    if(up.getTileEntity(worldObj) instanceof TileEntityPortableTank)
    {
      IFluidHandler handler = (IFluidHandler)up.getTileEntity(worldObj);
     
      if(handler.canFill(ForgeDirection.DOWN, fluid.getFluid()))
      {
        return handler.fill(ForgeDirection.DOWN, fluid, doFill);
      }
    }
   
View Full Code Here

Examples of net.minecraftforge.fluids.IFluidHandler.canFill()

      for (PartP2PLiquids l : getOutputs())
      {
        IFluidHandler handler = l.getTarget();
        if ( handler != null )
        {
          if ( handler.canFill( l.side.getOpposite(), input ) )
            outs.add( l );
        }
      }
    }
    catch (GridAccessException e)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.