Package net.minecraftforge.fluids

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


    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

    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

   
    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

      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.