mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 11:59:14 +00:00
Move to Maven structure
This commit is contained in:
1 parent
ad86fccb88
commit
5cdc894dad
537 files changed
No files matched your search
@@ -0,0 +1,48 @@
|
||||
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;
|
||||
|
||||
public class CastingChannelDataProvider implements IWailaDataProvider
|
||||
{
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack (IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead (ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
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)
|
||||
{
|
||||
FluidStack fs = te.liquid;
|
||||
currenttip.add("Liquid: " + WailaRegistrar.fluidNameHelper(fs));
|
||||
currenttip.add("Amount: " + fs.amount + "/" + te.getCapacity());
|
||||
}
|
||||
else
|
||||
{
|
||||
currenttip.add("§oEmpty"); // "§o" == Italics
|
||||
}
|
||||
}
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user