Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.connor.pvpoverhaul;
- import net.minecraft.client.Minecraft;
- import net.minecraft.client.resources.model.ModelResourceLocation;
- import net.minecraft.item.Item;
- import net.minecraft.item.ItemFood;
- import net.minecraftforge.fml.common.registry.GameRegistry;
- public class ModItems {
- public static Item gauze;
- public static Item poisonSteak;
- public static void init() {
- gauze = new Item().setUnlocalizedName("gauze");
- poisonSteak = new ItemFood(0, 0F, true).setUnlocalizedName("poisonSteak");
- }
- public static void register()
- {
- GameRegistry.registerItem(gauze, gauze.getUnlocalizedName().substring(5));
- GameRegistry.registerItem(poisonSteak, poisonSteak.getUnlocalizedName().substring(5));
- }
- public static void registerRenders()
- {
- registerRender(gauze);
- registerRender(poisonSteak);
- }
- public static void registerRender(Item item)
- {
- Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(gauze, 0, new ModelResourceLocation(Reference.MODID + ":" + item.getUnlocalizedName().substring(5), "inventory"));
- Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(poisonSteak, 0, new ModelResourceLocation(Reference.MODID + ":" + item.getUnlocalizedName().substring(5), "inventory"));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement