Good evening lads and lasses,
I am having a little problem while trying to display a chat message with an item. I want to do this through the addChatMessage() method, however it thinks my given argument is a String and not an IChatComponent. I have tried looking through the source however it didn't help me. Browsing the web and the Forge forum haven't given me an answer either.
@Override
public boolean func_111207_a(ItemStack itemstack, EntityPlayer player, EntityLivingBase target){
if(!target.worldObj.isRemote){
player.addChatMessage("Test");
}
return false;
}
This is what the troubling part of the code looks like. I have done exactly the same thing as some examples on the internet, that all worked perfectly fine according to the original programmer. Even directly copied a bit once, however it didn't work...
Summary
the method addChatMessage thinks the given argument is a String instead of IChatComponent