this is my item class
package addon.dsm.items;
import addon.dsm.armor.model.ModeloRopas;
import addon.dsm.main.DemonSlayerMain;
import addon.dsm.main.IHasModel;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.Item;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemArmor.ArmorMaterial;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
public class DSMRopa1 extends ItemArmor implements IHasModel{
public DSMRopa1(String name, CreativeTabs tab, ArmorMaterial materialIn, EntityEquipmentSlot equipmentSlotIn) {
super(materialIn, 1, equipmentSlotIn);
setUnlocalizedName(name);
setRegistryName(name);
setCreativeTab(tab);
setMaxStackSize(1);
ModItems.ITEMS.add(this);
}
@Override
public void registerModels() {
DemonSlayerMain.proxy.registerItemRenderer(this, 0, "inventory");
}
@SideOnly(Side.CLIENT)
@Override
public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, EntityEquipmentSlot armorSlot, ModelBiped _default)
{
if(!itemStack.isEmpty())
{
if(itemStack.getItem() instanceof ItemArmor)
{
ModeloRopas armorModel = new ModeloRopas(0.25f);
ModeloRopas armorModelLegs = new ModeloRopas(0.25f);
armorModel.bipedBody.showModel = (armorSlot == EntityEquipmentSlot.CHEST) || (armorSlot == EntityEquipmentSlot.CHEST);
armorModel.bipedRightArm.showModel = armorSlot == EntityEquipmentSlot.CHEST;
armorModel.bipedLeftArm.showModel = armorSlot == EntityEquipmentSlot.CHEST;
armorModelLegs.bipedRightLeg.showModel = (armorSlot == EntityEquipmentSlot.LEGS) || (armorSlot == EntityEquipmentSlot.FEET);
armorModelLegs.bipedLeftLeg.showModel = (armorSlot == EntityEquipmentSlot.LEGS) || (armorSlot == EntityEquipmentSlot.FEET);
armorModel.isSneak = _default.isSneak;
armorModel.isRiding = _default.isRiding;
armorModel.isChild = _default.isChild;
armorModel.rightArmPose = _default.rightArmPose;
armorModel.leftArmPose = _default.leftArmPose;
armorModelLegs.isSneak = _default.isSneak;
armorModelLegs.isRiding = _default.isRiding;
armorModelLegs.isChild = _default.isChild;
armorModelLegs.rightArmPose = _default.rightArmPose;
armorModelLegs.leftArmPose = _default.leftArmPose;
return armorModel;
}
}
return null;
}
}