Examples of FluidTankInfo


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

Examples of net.minecraftforge.fluids.FluidTankInfo

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

Examples of net.minecraftforge.fluids.FluidTankInfo

    return tank.canDrainFluidType(fluid);
  }

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

Examples of net.minecraftforge.fluids.FluidTankInfo

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

Examples of net.minecraftforge.fluids.FluidTankInfo

    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

Examples of net.minecraftforge.fluids.FluidTankInfo

    setAmount(getFluidAmount() + amount);
  }

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

Examples of net.minecraftforge.fluids.FluidTankInfo

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

Examples of net.minecraftforge.fluids.FluidTankInfo

    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

Examples of net.minecraftforge.fluids.FluidTankInfo

    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

Examples of net.minecraftforge.fluids.FluidTankInfo

    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
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.