mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 19:59:55 +00:00
Re-implemented all plugins
Updated to new Pulsar system, and to reflect various API changes (by TCon and others). Also reformatted build.gradle and bumped Gradle wrapper, Mantle, CCL, CCC, and Waila.
This commit is contained in:
1 parent
a4ea930882
commit
bff893221e
42 files changed
+939
-619
No files matched your search
@@ -0,0 +1,64 @@
|
||||
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.smeltery.logic.CastingBasinLogic;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BasinDataProvider implements IWailaDataProvider
|
||||
{
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack (IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
if (accessor.getTileEntity() instanceof CastingBasinLogic)
|
||||
{
|
||||
return ((CastingBasinLogic) accessor.getTileEntity()).getStackInSlot(0);
|
||||
}
|
||||
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 CastingBasinLogic && config.getConfig("tcon.basin", true))
|
||||
{
|
||||
CastingBasinLogic te = (CastingBasinLogic) accessor.getTileEntity();
|
||||
if (te.getFluidAmount() != 0)
|
||||
{
|
||||
FluidStack fs = te.getFluid();
|
||||
currenttip.add("Liquid: " + WailaRegistrar.fluidNameHelper(fs));
|
||||
currenttip.add("Amount: " + fs.amount + "/" + te.getCapacity());
|
||||
}
|
||||
else
|
||||
{
|
||||
if (te.getStackInSlot(0) != null)
|
||||
{
|
||||
currenttip.add("Contains: " + te.getStackInSlot(0).getDisplayName());
|
||||
}
|
||||
else
|
||||
{
|
||||
currenttip.add("§oEmpty"); // "§o" == Italics
|
||||
}
|
||||
}
|
||||
}
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail (ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user