Clean up on tank code
This commit is contained in:
parent
a3e04e0747
commit
f3fe505df2
2 changed files with 4 additions and 8 deletions
|
@ -42,6 +42,8 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||||
public class TileTank extends TileFluidDistribution implements IComparatorInputOverride, ISneakPickup
|
public class TileTank extends TileFluidDistribution implements IComparatorInputOverride, ISneakPickup
|
||||||
{
|
{
|
||||||
public static final int VOLUME = 16;
|
public static final int VOLUME = 16;
|
||||||
|
private int networkVolumeClient = 0;
|
||||||
|
private int networkCapClient = 0;
|
||||||
|
|
||||||
public TileTank()
|
public TileTank()
|
||||||
{
|
{
|
||||||
|
@ -228,7 +230,7 @@ public class TileTank extends TileFluidDistribution implements IComparatorInputO
|
||||||
{
|
{
|
||||||
List<ItemStack> drops = new ArrayList<ItemStack>();
|
List<ItemStack> drops = new ArrayList<ItemStack>();
|
||||||
|
|
||||||
ItemStack itemStack = new ItemStack(Archaic.blockTank);
|
ItemStack itemStack = new ItemStack(Archaic.blockTank, 1, 0);
|
||||||
if (itemStack != null)
|
if (itemStack != null)
|
||||||
{
|
{
|
||||||
if (getInternalTank() != null && getInternalTank().getFluid() != null)
|
if (getInternalTank() != null && getInternalTank().getFluid() != null)
|
||||||
|
@ -241,7 +243,7 @@ public class TileTank extends TileFluidDistribution implements IComparatorInputO
|
||||||
{
|
{
|
||||||
itemStack.setTagCompound(new NBTTagCompound());
|
itemStack.setTagCompound(new NBTTagCompound());
|
||||||
}
|
}
|
||||||
drain(ForgeDirection.UNKNOWN, stack.amount, true);
|
drain(ForgeDirection.UNKNOWN, stack.amount, false);
|
||||||
itemStack.getTagCompound().setCompoundTag("fluid", stack.writeToNBT(new NBTTagCompound()));
|
itemStack.getTagCompound().setCompoundTag("fluid", stack.writeToNBT(new NBTTagCompound()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,12 +23,6 @@ public class WailaFluidTank implements IWailaDataProvider
|
||||||
if (tile instanceof TileTank)
|
if (tile instanceof TileTank)
|
||||||
{
|
{
|
||||||
FluidTank tank = ((TileTank) tile).getInternalTank();
|
FluidTank tank = ((TileTank) tile).getInternalTank();
|
||||||
FluidTank tankNetwork = ((TileTank) tile).getNetwork().getTank();
|
|
||||||
if (tankNetwork != null && tankNetwork.getFluid() != null)
|
|
||||||
{
|
|
||||||
currenttip.add(LanguageUtility.getLocal("info.waila.tank.fluid") + " " + tankNetwork.getFluid().getFluid().getLocalizedName());
|
|
||||||
currenttip.add(LanguageUtility.getLocal("info.waila.tank.vol") + " " + tankNetwork.getFluidAmount() + " / " + tank.getCapacity());
|
|
||||||
}
|
|
||||||
if (tank != null && tank.getFluid() != null)
|
if (tank != null && tank.getFluid() != null)
|
||||||
{
|
{
|
||||||
currenttip.add(LanguageUtility.getLocal("info.waila.tank.fluid") + " " + tank.getFluid().getFluid().getLocalizedName());
|
currenttip.add(LanguageUtility.getLocal("info.waila.tank.fluid") + " " + tank.getFluid().getFluid().getLocalizedName());
|
||||||
|
|
Loading…
Reference in a new issue