2015-04-12 12:39:06 +02:00
|
|
|
package techreborn.compat.waila;
|
|
|
|
|
|
|
|
import mcp.mobius.waila.api.IWailaConfigHandler;
|
|
|
|
import mcp.mobius.waila.api.IWailaDataAccessor;
|
|
|
|
import mcp.mobius.waila.api.IWailaDataProvider;
|
|
|
|
import net.minecraft.entity.player.EntityPlayerMP;
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
import net.minecraft.nbt.NBTTagCompound;
|
|
|
|
import net.minecraft.tileentity.TileEntity;
|
2015-12-13 20:41:46 +01:00
|
|
|
import net.minecraft.util.BlockPos;
|
2015-04-12 12:39:06 +02:00
|
|
|
import net.minecraft.world.World;
|
2015-11-08 13:15:45 +01:00
|
|
|
import reborncore.api.IListInfoProvider;
|
2015-04-12 12:39:06 +02:00
|
|
|
|
2016-03-13 16:37:55 +01:00
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.List;
|
|
|
|
|
2015-04-12 12:39:06 +02:00
|
|
|
public class WailaProviderMachines implements IWailaDataProvider {
|
|
|
|
|
2015-08-09 12:05:32 +02:00
|
|
|
private List<String> info = new ArrayList<String>();
|
2015-04-12 12:39:06 +02:00
|
|
|
|
2015-08-09 12:05:32 +02:00
|
|
|
@Override
|
|
|
|
public List<String> getWailaBody(ItemStack item, List<String> tip,
|
|
|
|
IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
2015-11-08 13:15:45 +01:00
|
|
|
if (accessor.getTileEntity() instanceof IListInfoProvider) {
|
2015-10-22 19:19:05 +02:00
|
|
|
((IListInfoProvider) accessor.getTileEntity()).addInfo(info, true);
|
|
|
|
}
|
2015-08-09 12:05:32 +02:00
|
|
|
tip.addAll(info);
|
|
|
|
info.clear();
|
2015-04-12 12:39:06 +02:00
|
|
|
|
2015-08-09 12:05:32 +02:00
|
|
|
return tip;
|
|
|
|
}
|
2015-04-12 12:39:06 +02:00
|
|
|
|
2015-08-09 12:05:32 +02:00
|
|
|
@Override
|
|
|
|
public List<String> getWailaHead(ItemStack item, List<String> tip,
|
|
|
|
IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
2015-04-12 12:39:06 +02:00
|
|
|
|
2015-08-09 12:05:32 +02:00
|
|
|
return tip;
|
|
|
|
}
|
2015-04-12 12:39:06 +02:00
|
|
|
|
2015-08-09 12:05:32 +02:00
|
|
|
@Override
|
|
|
|
public List<String> getWailaTail(ItemStack item, List<String> tip,
|
|
|
|
IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
2015-04-12 12:39:06 +02:00
|
|
|
|
2015-08-09 12:05:32 +02:00
|
|
|
return tip;
|
|
|
|
}
|
2015-04-12 12:39:06 +02:00
|
|
|
|
2015-08-09 12:05:32 +02:00
|
|
|
@Override
|
|
|
|
public ItemStack getWailaStack(IWailaDataAccessor accessor,
|
|
|
|
IWailaConfigHandler config) {
|
2015-04-12 12:39:06 +02:00
|
|
|
|
2015-08-09 12:05:32 +02:00
|
|
|
return null;
|
|
|
|
}
|
2015-04-12 12:39:06 +02:00
|
|
|
|
2015-08-09 12:05:32 +02:00
|
|
|
@Override
|
|
|
|
public NBTTagCompound getNBTData(EntityPlayerMP player, TileEntity te,
|
2015-12-13 20:41:46 +01:00
|
|
|
NBTTagCompound tag, World w, BlockPos pos) {
|
2015-04-12 12:39:06 +02:00
|
|
|
|
2015-08-09 12:05:32 +02:00
|
|
|
return tag;
|
|
|
|
}
|
2015-04-12 12:39:06 +02:00
|
|
|
}
|