2013-10-05 17:03:38 +01:00
|
|
|
package tconstruct.plugins.waila;
|
|
|
|
|
|
|
|
|
|
import mcp.mobius.waila.api.IWailaConfigHandler;
|
|
|
|
|
import mcp.mobius.waila.api.IWailaDataAccessor;
|
|
|
|
|
import mcp.mobius.waila.api.IWailaDataProvider;
|
2014-08-19 20:25:32 +03:00
|
|
|
import mcp.mobius.waila.api.SpecialChars;
|
2013-10-05 17:03:38 +01:00
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
|
import net.minecraftforge.fluids.FluidStack;
|
2014-08-05 22:09:57 -04:00
|
|
|
import tconstruct.smeltery.logic.LavaTankLogic;
|
2013-10-05 17:03:38 +01:00
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
2013-11-10 13:57:35 -08:00
|
|
|
public class SearedTankDataProvider implements IWailaDataProvider
|
|
|
|
|
{
|
2013-10-05 17:03:38 +01:00
|
|
|
|
|
|
|
|
@Override
|
2013-11-10 13:57:35 -08:00
|
|
|
public ItemStack getWailaStack (IWailaDataAccessor accessor, IWailaConfigHandler config)
|
|
|
|
|
{
|
2013-10-05 17:03:38 +01:00
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
2013-11-10 13:57:35 -08:00
|
|
|
public List<String> getWailaHead (ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
|
|
|
|
|
{
|
2013-10-05 17:03:38 +01:00
|
|
|
return currenttip;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
2013-11-10 13:57:35 -08:00
|
|
|
public List<String> getWailaBody (ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
|
|
|
|
|
{
|
2013-12-25 00:24:02 +01:00
|
|
|
if (accessor.getTileEntity() instanceof LavaTankLogic && config.getConfig("tcon.searedtank", true))
|
2013-11-10 13:57:35 -08:00
|
|
|
{
|
|
|
|
|
LavaTankLogic te = (LavaTankLogic) accessor.getTileEntity();
|
|
|
|
|
if (te.containsFluid())
|
|
|
|
|
{
|
2013-10-05 17:03:38 +01:00
|
|
|
FluidStack fs = te.tank.getFluid();
|
2013-10-19 10:02:00 -04:00
|
|
|
currenttip.add("Liquid: " + WailaRegistrar.fluidNameHelper(fs));
|
2013-10-05 17:03:38 +01:00
|
|
|
currenttip.add("Amount: " + fs.amount + "/" + te.tank.getCapacity());
|
2013-11-10 13:57:35 -08:00
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2014-08-19 20:25:32 +03:00
|
|
|
currenttip.add(SpecialChars.ITALIC + "Empty");
|
2013-10-05 17:03:38 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return currenttip;
|
|
|
|
|
}
|
2014-05-10 16:50:27 -04:00
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public List<String> getWailaTail (ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
|
|
|
|
|
{
|
|
|
|
|
return currenttip;
|
|
|
|
|
}
|
|
|
|
|
|
2013-10-05 17:03:38 +01:00
|
|
|
}
|