Package net.minecraftforge.fluids

Examples of net.minecraftforge.fluids.FluidTankInfo


  @SuppressWarnings({ "rawtypes", "unchecked" })
  @Override
  public Object toLua(ITypeConvertersRegistry registry, Object o) {
    if (o instanceof FluidTankInfo) {
      FluidTankInfo fti = (FluidTankInfo)o;
      Map map = new HashMap();
      map.put("capacity", fti.capacity);
      FluidStack fluidStack = fti.fluid;
      if (fluidStack != null) {
        map.put("amount", fluidStack.amount);
View Full Code Here


  @Override
  public FluidTankInfo[] getTankInfo(ForgeDirection from)
  {
    return new FluidTankInfo[]
    { new FluidTankInfo(null, 10000) };
  }
View Full Code Here

    return tank.canDrainFluidType(fluid);
  }

  @Override
  public FluidTankInfo[] getTankInfo(ForgeDirection from) {
    return new FluidTankInfo[] { new FluidTankInfo(tank) };
  }
View Full Code Here

          }
        }
      }
    }
    if(res.isEmpty()) {
      return new FluidTankInfo[] { new FluidTankInfo(null, 0) };
    } else {
      return res.toArray(new FluidTankInfo[res.size()]);
    }
  }
View Full Code Here

    return fluid != null && fluid.getID() == EnderIO.fluidXpJuice.getID();
  }
 
  public FluidTankInfo[] getTankInfo(ForgeDirection from) {   
    return new FluidTankInfo[] {
      new FluidTankInfo(new FluidStack(EnderIO.fluidXpJuice, getFluidAmount()), getMaxFluidAmount()) 
    };
  }
View Full Code Here

    setAmount(getFluidAmount() + amount);
  }

  @Override
  public FluidTankInfo getInfo() {
    return new FluidTankInfo(this);
  }
View Full Code Here

  @Override
  public FluidTankInfo[] getTankInfo(ForgeDirection from) {
    if(network == null) {
      return null;
    }
    return new FluidTankInfo[] { new FluidTankInfo(tank) };
  }
View Full Code Here

    c = tile;
    o = orientation;
  }

  public int getFluidId() {
    FluidTankInfo tank = getTank();
    if (tank == null)
      return 0;

    FluidStack fluid = tank.fluid;
    return fluid != null ? fluid.fluidID : 0;
View Full Code Here

    FluidStack fluid = tank.fluid;
    return fluid != null ? fluid.fluidID : 0;
  }

  public int getFluidCapacity() {
    FluidTankInfo tank = getTank();
    if (tank == null)
      return 0;

    return tank.capacity;
  }
View Full Code Here

    return tank.capacity;
  }

  public int getFluidAmount() {
    FluidTankInfo tank = getTank();
    if (tank == null)
      return 0;

    FluidStack fluid = tank.fluid;
    return fluid != null ? fluid.amount : 0;
View Full Code Here

TOP

Related Classes of net.minecraftforge.fluids.FluidTankInfo

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.