package bl4ckscor3.mod.globalxp.imc.waila;

import java.util.List;

import bl4ckscor3.mod.globalxp.blocks.XPBlock;
import bl4ckscor3.mod.globalxp.tileentity.TileEntityXPBlock;
import mcp.mobius.waila.api.IWailaConfigHandler;
import mcp.mobius.waila.api.IWailaDataAccessor;
import mcp.mobius.waila.api.IWailaDataProvider;
import mcp.mobius.waila.api.IWailaRegistrar;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.translation.I18n;
import net.minecraft.world.World;

public class WailaDataProvider implements IWailaDataProvider
{
	public static void callbackRegister(IWailaRegistrar registrar)
	{
		registrar.registerBodyProvider(new WailaDataProvider(), XPBlock.class);
		registrar.registerStackProvider(new WailaDataProvider(), XPBlock.class);
	}
	
	@Override
	public NBTTagCompound getNBTData(EntityPlayerMP arg0, TileEntity arg1, NBTTagCompound arg2, World arg3, BlockPos arg4)
	{
		return arg2;
	}

	@Override
	public List<String> getWailaBody(ItemStack arg0, List<String> arg1, IWailaDataAccessor arg2, IWailaConfigHandler arg3)
	{
		arg1.add(String.format(I18n.translateToLocal("waila.body"), ((TileEntityXPBlock)arg2.getTileEntity()).getStoredLevels()));
		return arg1;
	}

	@Override
	public List<String> getWailaHead(ItemStack arg0, List<String> arg1, IWailaDataAccessor arg2, IWailaConfigHandler arg3)
	{
		return arg1;
	}

	@Override
	public ItemStack getWailaStack(IWailaDataAccessor arg0, IWailaConfigHandler arg1)
	{
		return ((XPBlock)(arg0.getBlock())).getWailaDisplayStack();
	}

	@Override
	public List<String> getWailaTail(ItemStack arg0, List<String> arg1, IWailaDataAccessor arg2, IWailaConfigHandler arg3)
	{
		return arg1;
	}
}

@@ -365,24 +365,69 @@
 Registrar;%0D%0A
+import net.minecraft.client.resources.I18n;%0D%0A
 import net.m
@@ -637,58 +637,8 @@
 s;%0D%0A
-import net.minecraft.util.text.translation.I18n;%0D%0A
 impo
@@ -1292,24 +1292,14 @@
 18n.
-translateToLocal
+format
 (%22wa

use correct language class