Clean up on tank code

This commit is contained in:
Robert S 2014-05-16 15:23:49 -04:00
parent a3e04e0747
commit f3fe505df2
2 changed files with 4 additions and 8 deletions

View file

@ -42,6 +42,8 @@ import cpw.mods.fml.relauncher.SideOnly;
public class TileTank extends TileFluidDistribution implements IComparatorInputOverride, ISneakPickup
{
public static final int VOLUME = 16;
private int networkVolumeClient = 0;
private int networkCapClient = 0;
public TileTank()
{
@ -228,7 +230,7 @@ public class TileTank extends TileFluidDistribution implements IComparatorInputO
{
List<ItemStack> drops = new ArrayList<ItemStack>();
ItemStack itemStack = new ItemStack(Archaic.blockTank);
ItemStack itemStack = new ItemStack(Archaic.blockTank, 1, 0);
if (itemStack != null)
{
if (getInternalTank() != null && getInternalTank().getFluid() != null)
@ -241,7 +243,7 @@ public class TileTank extends TileFluidDistribution implements IComparatorInputO
{
itemStack.setTagCompound(new NBTTagCompound());
}
drain(ForgeDirection.UNKNOWN, stack.amount, true);
drain(ForgeDirection.UNKNOWN, stack.amount, false);
itemStack.getTagCompound().setCompoundTag("fluid", stack.writeToNBT(new NBTTagCompound()));
}
}

View file

@ -23,12 +23,6 @@ public class WailaFluidTank implements IWailaDataProvider
if (tile instanceof TileTank)
{
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)
{
currenttip.add(LanguageUtility.getLocal("info.waila.tank.fluid") + " " + tank.getFluid().getFluid().getLocalizedName());