I'm trying to get my armor to render correctly, and I'm running into what's probably a basic problem. The method I'm using to get the texture, which I think is all right, is:
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type){
if(stack.getItem() == Heart.heartstoneChestplate) {
return "tutorial:textures/models/armor/heartstone_1.png";
}
else
return null;
}
The problem comes when I actually try to call this method, from my main mod file:
heartstoneChestplate = new ItemArmor(HEARTSTONE, proxy.addArmor("heartstone"), 1)
.getArmorTexture(new ItemStack(this.heartstoneChestplate), null, 1, "heartstone");
...Which underlines the whole definition in red and invites me to change heartstoneChestplate to a string rather than an item. The problem seems to be tied to the "new ItemStack" part. Am I calling ItemStack incorrectly? Is new the wrong keyword to use here?
Thanks for your help!