public class Tank
extends net.minecraftforge.fluids.FluidTank
| Constructor and Description |
|---|
Tank(java.lang.String name,
int capacity,
net.minecraft.tileentity.TileEntity tile)
Make a new fluid tank.
|
| Modifier and Type | Method and Description |
|---|---|
net.minecraftforge.fluids.Fluid |
getFluidType()
Get the fluid that currently occupies this tank, will return null if there is no fluid.
|
java.lang.String |
getName() |
boolean |
isEmpty()
Check if this tank is empty.
|
boolean |
isFull()
Check if this tank is full; the capacity is reached.
|
net.minecraftforge.fluids.FluidTank |
readFromNBT(net.minecraft.nbt.NBTTagCompound nbt) |
void |
readTankFromNBT(net.minecraft.nbt.NBTTagCompound nbt)
Read the tank contents from NBT.
|
protected boolean |
replaceInnerFluid() |
void |
writeTankToNBT(net.minecraft.nbt.NBTTagCompound nbt)
Write the tank contents to NBT.
|
net.minecraft.nbt.NBTTagCompound |
writeToNBT(net.minecraft.nbt.NBTTagCompound nbt) |
public Tank(java.lang.String name,
int capacity,
net.minecraft.tileentity.TileEntity tile)
name - The name for the tank, used for NBT storage.capacity - The capacity (mB) for the tank.tile - The TileEntity that uses this tank.public boolean isEmpty()
public boolean isFull()
public net.minecraftforge.fluids.Fluid getFluidType()
protected boolean replaceInnerFluid()
public net.minecraft.nbt.NBTTagCompound writeToNBT(net.minecraft.nbt.NBTTagCompound nbt)
writeToNBT in class net.minecraftforge.fluids.FluidTankpublic net.minecraftforge.fluids.FluidTank readFromNBT(net.minecraft.nbt.NBTTagCompound nbt)
readFromNBT in class net.minecraftforge.fluids.FluidTankpublic void writeTankToNBT(net.minecraft.nbt.NBTTagCompound nbt)
nbt - The NBT tag to write to.public void readTankFromNBT(net.minecraft.nbt.NBTTagCompound nbt)
nbt - The NBT tag to write from.public java.lang.String getName()