SHARE
TWEET

Untitled

a guest Apr 25th, 2016 23 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package fr.toinetoine1.Modding.init;
  2.  
  3. import fr.toinetoine1.Modding.utils.References;
  4. import net.minecraft.client.Minecraft;
  5. import net.minecraft.client.resources.model.ModelResourceLocation;
  6. import net.minecraft.creativetab.CreativeTabs;
  7. import net.minecraft.item.Item;
  8. import net.minecraftforge.fml.common.registry.GameRegistry;
  9.  
  10. public class ItemMod {
  11.  
  12.    
  13.     public static Item itemModBasic;
  14.    
  15.     public static void init(){
  16.         itemModBasic = new Item().setUnlocalizedName("itemModBasic").setCreativeTab(CreativeTabs.tabFood);
  17.        
  18.     }
  19.    
  20.     public static void register(){
  21.    
  22.         GameRegistry.registerItem(itemModBasic, "itemModBasic");
  23.        
  24.     }
  25.    
  26.     public static void RegisterRenders(){
  27.        
  28.         registerRender(itemModBasic);
  29.        
  30.     }
  31.    
  32.     public static void registerRender(Item item){
  33.        
  34.         Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0,new ModelResourceLocation(References.MOD_ID+":"+ item.getUnlocalizedName().substring(5), "inventory"));
  35.     }
  36. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top