package com.yolp900.itsjustacharm.common.items.base;
import com.yolp900.itsjustacharm.ItsJustaCharm;
import com.yolp900.itsjustacharm.api.IJCConstants;
import com.yolp900.itsjustacharm.common.items.ModItems;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.common.registry.GameRegistry;
public abstract class ModItem extends Item implements IModItem {
public ModItem(IJCConstants.Items item) {
this.setRegistryName(item.getRegistryName());
this.setUnlocalizedName(item.getUnlocalizedName());
this.setCreativeTab(ItsJustaCharm.creativeTab);
ModItems.modItems.add(this);
}
public void registerItem() {
GameRegistry.register(this);
}
public void registerRender() {
ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation(this.getRegistryName().toString()));
}
}