daily pastebin goal
2%
SHARE
TWEET

Untitled

Superloup10 Feb 22nd, 2019 (edited) 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.finalhope.mod.items;
  2.  
  3. import com.finalhope.mod.Main;
  4.  
  5. import net.minecraft.client.renderer.block.model.ModelResourceLocation;
  6. import net.minecraft.item.Item;
  7. import net.minecraftforge.client.event.ModelRegistryEvent;
  8. import net.minecraftforge.client.model.ModelLoader;
  9. import net.minecraftforge.fml.common.Mod;
  10. import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
  11. import net.minecraftforge.fml.relauncher.Side;
  12. import net.minecraftforge.fml.relauncher.SideOnly;
  13.  
  14. @Mod.EventBusSubscriber(value = Side.CLIENT, modid = Main.MODID)
  15. public class FinalItems {
  16.  
  17.     public static final Item clef_cwu = new CleCWU().setCreativeTab(Main.FINALHOPE);
  18.     public static final Item clef_resistant = new CleResistant().setCreativeTab(Main.FINALHOPE);
  19.     public static final Item clef_combine = new CleCombine().setCreativeTab(Main.FINALHOPE);
  20.     public static final Item baton_fouille = new BatonFouille().setCreativeTab(Main.FINALHOPE);
  21.     public static final Item radio_mpf = new RadioMPF().setCreativeTab(Main.FINALHOPE);
  22.     public static final Item rations = new Rations(6, 3.4F, false).setCreativeTab(Main.FINALHOPE);
  23.     public static final Item medic = new Medic().setCreativeTab(Main.FINALHOPE);
  24.     public static final Item pain = new Pain(4, 2.4F, false).setCreativeTab(Main.FINALHOPE);
  25.     public static final Item pomme = new Pomme(2, 2.4F, false).setCreativeTab(Main.FINALHOPE);
  26.     public static final Item tomate = new Tomate(2, 2.4F, false).setCreativeTab(Main.FINALHOPE);
  27.     public static final Item boite_tomate = new BoiteTomate(6, 3.4F, false).setCreativeTab(Main.FINALHOPE);
  28.     public static final Item banane = new Banane(2, 2.4F, false).setCreativeTab(Main.FINALHOPE);
  29.     public static final Item eponge = new Eponge().setCreativeTab(Main.FINALHOPE);
  30.     public static final Item linge_sale = new LingeSale().setCreativeTab(Main.FINALHOPE);
  31.     public static final Item linge_propre_mouille = new LingePropreMouille().setCreativeTab(Main.FINALHOPE);
  32.     public static final Item linge_propre_sec = new LingePropreSec().setCreativeTab(Main.FINALHOPE);
  33.     public static final Item lessive = new Lessive().setCreativeTab(Main.FINALHOPE);
  34.  
  35.    
  36.     public static void setItemsName(Item item, String name) {
  37.         item.setRegistryName(name).setUnlocalizedName(name);
  38.     }
  39.  
  40.     @SideOnly(Side.CLIENT)
  41.     @SubscribeEvent
  42.     public static void registerItemModels(ModelRegistryEvent event) {
  43.         registerModel(clef_cwu, 0);
  44.         registerModel(clef_combine, 0);
  45.         registerModel(clef_resistant, 0);
  46.         registerModel(baton_fouille, 0);
  47.         registerModel(radio_mpf, 0);
  48.         registerModel(rations, 0);
  49.         registerModel(medic, 0);
  50.         registerModel(pain, 0);
  51.         registerModel(pomme, 0);
  52.         registerModel(tomate, 0);
  53.         registerModel(boite_tomate, 0);
  54.         registerModel(banane, 0);
  55.         registerModel(eponge, 0);
  56.         registerModel(linge_sale, 0);
  57.         registerModel(linge_propre_mouille, 0);
  58.         registerModel(linge_propre_sec, 0);
  59.         registerModel(lessive, 0);
  60.     }
  61.  
  62.     @SideOnly(Side.CLIENT)
  63.     public static void registerModel(Item item, int metadata) {
  64.         ModelLoader.setCustomModelResourceLocation(item, metadata, new ModelResourceLocation(item.getRegistryName(), "inventory"));
  65.     }
  66. }
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