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;
|
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
|
import net.minecraftforge.fluids.FluidStack;
|
|
|
|
|
import tconstruct.blocks.logic.CastingChannelLogic;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
2013-11-10 13:57:35 -08:00
|
|
|
public class CastingChannelDataProvider 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)
|
|
|
|
|
{
|
|
|
|
|
if (accessor.getTileEntity() instanceof CastingChannelLogic)
|
|
|
|
|
{
|
|
|
|
|
CastingChannelLogic te = (CastingChannelLogic) accessor.getTileEntity();
|
|
|
|
|
if (te.liquid != null && te.liquid.amount > 0)
|
|
|
|
|
{
|
2013-10-05 17:03:38 +01:00
|
|
|
FluidStack fs = te.liquid;
|
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.getCapacity());
|
2013-11-10 13:57:35 -08:00
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2013-10-05 17:03:38 +01:00
|
|
|
currenttip.add("§oEmpty"); // "§o" == Italics
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return currenttip;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|