Skip to content

Instantly share code, notes, and snippets.

Created March 18, 2016 16:56
Show Gist options
  • Save anonymous/e2451b8fee12c1d87ed7 to your computer and use it in GitHub Desktop.
Save anonymous/e2451b8fee12c1d87ed7 to your computer and use it in GitHub Desktop.
package hubbard.trueminecraftmachines.init;
import hubbard.trueminecraftmachines.items.itemIronDust;
import hubbard.trueminecraftmachines.main.Reference;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraftforge.fml.common.registry.GameRegistry;
public class Item_List
{
public static Item iron_dust;
public static void init()
{
iron_dust = new itemIronDust().setUnlocalizedName("iron_dust");
}
public static void register()
{
GameRegistry.registerItem(iron_dust, iron_dust.getUnlocalizedName().substring(5));
}
public static void registerRenders()
{
registerRender(iron_dust);
}
public static void registerRender(Item item)
{
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MOD_ID + ":" + item.getUnlocalizedName().substring(5), "inventory"));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment