Package extracells.tileentity

Source Code of extracells.tileentity.TileEntityVoidFluid

package extracells.tileentity;

import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.ForgeDirection;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidTankInfo;
import net.minecraftforge.fluids.IFluidHandler;

public class TileEntityVoidFluid extends TileEntity implements IFluidHandler
{

  @Override
  public boolean canUpdate()
  {
    return false;
  }
 
  @Override
  public int fill(ForgeDirection from, FluidStack resource, boolean doFill)
  {
    if (resource != null)
      return resource.amount;
    return 0;
  }

  @Override
  public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain)
  {
    return null;
  }

  @Override
  public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain)
  {
    return null;
  }

  @Override
  public boolean canFill(ForgeDirection from, Fluid fluid)
  {
    return true;
  }

  @Override
  public boolean canDrain(ForgeDirection from, Fluid fluid)
  {
    return false;
  }

  @Override
  public FluidTankInfo[] getTankInfo(ForgeDirection from)
  {
    return new FluidTankInfo[]
    { new FluidTankInfo(null, 10000) };
  }
}
TOP

Related Classes of extracells.tileentity.TileEntityVoidFluid

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.