SHARE
TWEET

ModItems.java

Camellias_ Jul 7th, 2017 23 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package init;
  2.  
  3. import camellias_.fallout.Reference;
  4. import items.ItemBullet;
  5. import items.ItemRevolver;
  6. import net.minecraft.client.Minecraft;
  7. import net.minecraft.client.renderer.block.model.ModelResourceLocation;
  8. import net.minecraft.item.Item;
  9. import net.minecraftforge.fml.common.registry.GameRegistry;
  10.  
  11. public class ModItems {
  12.    
  13.     public static Item revolver;
  14.     public static Item bullet;
  15.    
  16.     public static void init() {
  17.        
  18.         revolver = new ItemRevolver();
  19.         bullet = new ItemBullet();
  20.        
  21.     }
  22.    
  23.     public static void register() {
  24.         GameRegistry.register(revolver);
  25.         GameRegistry.register(bullet);
  26.     }
  27.    
  28.     public static void registerRenders() {
  29.         registerRender(revolver);
  30.         registerRender(bullet);
  31.     }
  32.    
  33.     private static void registerRender(Item item) {
  34.         Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory"));
  35.     }
  36.  
  37. }
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