Actually, how to add the XP param to the Metadata Smelting? (MCP 7.18_pre1 & forge 6.0.0.328)
I got it working: Just added this to the item (you could switch xp based on damage value then), just doesnt drop xp orbs:
@Override
public void onCreated(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
int var2 = par1ItemStack.stackSize;
float var3 = 5; //Exp for 1 Item
int var4 = 0; //contains calculated xp to process
if (var3 == 0.0F) {
var2 = 0;
}
else if (var3 < 1.0F){
var4 = MathHelper.floor_float((float)var2 * var3);
if (var4 < MathHelper.ceiling_float_int((float)var2 * var3) && (float)Math.random() < (float)var2 * var3 - (float)var4) {
++var4;
}
var2 = var4;
}
else
var4=(int) (var2*var3);
par3EntityPlayer.addExperience(var4);
}