public class WorldSharedTank
extends org.cyclops.cyclopscore.fluid.SingleUseTank
| Modifier and Type | Class and Description |
|---|---|
static class |
WorldSharedTank.TankData
Tank data stored in the world.
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NBT_TANKID
The NBT name for the fluid tank.
|
protected java.lang.String |
tankID |
| Constructor and Description |
|---|
WorldSharedTank(java.lang.String name,
int capacity,
org.cyclops.cyclopscore.tileentity.CyclopsTileEntity tile)
Make a new tank instance.
|
| Modifier and Type | Method and Description |
|---|---|
net.minecraftforge.fluids.FluidStack |
drain(net.minecraftforge.fluids.FluidStack resource,
boolean doDrain) |
net.minecraftforge.fluids.FluidStack |
drain(int maxDrain,
boolean doDrain) |
int |
fill(net.minecraftforge.fluids.FluidStack resource,
boolean doFill) |
net.minecraftforge.fluids.Fluid |
getAcceptedFluid() |
net.minecraftforge.fluids.FluidStack |
getFluid() |
int |
getFluidAmount() |
int |
getPreviousAmount()
Get the previous fluid amount, used for interpolating fluid amounts client-side.
|
java.lang.String |
getTankID()
Get the tank ID.
|
void |
readTankFromNBT(net.minecraft.nbt.NBTTagCompound nbt) |
protected void |
readWorldFluid() |
protected boolean |
replaceInnerFluid() |
void |
resetPreviousFluid()
Reset the previous fluid storage, used for interpolating fluid amounts client-side.
|
void |
setFluid(net.minecraftforge.fluids.FluidStack fluid) |
void |
setTankID(java.lang.String tankID)
Set the tank ID.
|
void |
writeTankToNBT(net.minecraft.nbt.NBTTagCompound nbt) |
protected void |
writeWorldFluid() |
canDrainFluidType, canFillFluidType, reset, sendUpdate, setAcceptedFluidgetFluidType, getName, isEmpty, isFull, readFromNBT, writeToNBTpublic static final java.lang.String NBT_TANKID
protected java.lang.String tankID
public WorldSharedTank(java.lang.String name,
int capacity,
org.cyclops.cyclopscore.tileentity.CyclopsTileEntity tile)
name - The name for the tank, will be used for NBT storage.capacity - The capacity (mB) for the tank.tile - The TileEntity that uses this tank.public void resetPreviousFluid()
public int getPreviousAmount()
public void writeTankToNBT(net.minecraft.nbt.NBTTagCompound nbt)
writeTankToNBT in class org.cyclops.cyclopscore.fluid.SingleUseTankpublic void readTankFromNBT(net.minecraft.nbt.NBTTagCompound nbt)
readTankFromNBT in class org.cyclops.cyclopscore.fluid.SingleUseTankprotected void readWorldFluid()
protected void writeWorldFluid()
public void setFluid(net.minecraftforge.fluids.FluidStack fluid)
setFluid in class net.minecraftforge.fluids.FluidTankpublic net.minecraftforge.fluids.FluidStack getFluid()
getFluid in interface net.minecraftforge.fluids.IFluidTankgetFluid in class net.minecraftforge.fluids.FluidTankpublic int getFluidAmount()
getFluidAmount in interface net.minecraftforge.fluids.IFluidTankgetFluidAmount in class net.minecraftforge.fluids.FluidTankpublic int fill(net.minecraftforge.fluids.FluidStack resource,
boolean doFill)
fill in interface net.minecraftforge.fluids.capability.IFluidHandlerfill in interface net.minecraftforge.fluids.IFluidTankfill in class org.cyclops.cyclopscore.fluid.SingleUseTankpublic net.minecraftforge.fluids.FluidStack drain(int maxDrain,
boolean doDrain)
drain in interface net.minecraftforge.fluids.capability.IFluidHandlerdrain in interface net.minecraftforge.fluids.IFluidTankdrain in class org.cyclops.cyclopscore.fluid.SingleUseTankpublic net.minecraftforge.fluids.FluidStack drain(net.minecraftforge.fluids.FluidStack resource,
boolean doDrain)
drain in interface net.minecraftforge.fluids.capability.IFluidHandlerdrain in class org.cyclops.cyclopscore.fluid.SingleUseTankpublic java.lang.String getTankID()
public void setTankID(java.lang.String tankID)
tankID - The new tank ID.public net.minecraftforge.fluids.Fluid getAcceptedFluid()
getAcceptedFluid in class org.cyclops.cyclopscore.fluid.SingleUseTankprotected boolean replaceInnerFluid()
replaceInnerFluid in class org.cyclops.cyclopscore.fluid.Tank