G2A Many GEOs
SHARE
TWEET

Untitled

LinusPhoenix Oct 10th, 2013 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package phnxflms.unidye;
  2.  
  3. import net.minecraft.block.Block;
  4. import net.minecraft.block.material.Material;
  5. import net.minecraft.creativetab.CreativeTabs;
  6. import net.minecraft.item.Item;
  7. import net.minecraft.item.ItemStack;
  8. import net.minecraftforge.common.Configuration;
  9. import cpw.mods.fml.common.Mod.EventHandler;
  10. import net.minecraftforge.common.MinecraftForge;
  11. import net.minecraftforge.oredict.OreDictionary;
  12. import cpw.mods.fml.common.Mod;
  13. import cpw.mods.fml.common.Mod.PreInit; // used in 1.5.2
  14. import cpw.mods.fml.common.Mod.Init; // used in 1.5.2
  15. import cpw.mods.fml.common.Mod.PostInit; // used in 1.5.2
  16. import cpw.mods.fml.common.Mod.Instance;
  17. import cpw.mods.fml.common.SidedProxy;
  18. import cpw.mods.fml.common.event.FMLInitializationEvent;
  19. import cpw.mods.fml.common.event.FMLPostInitializationEvent;
  20. import cpw.mods.fml.common.event.FMLPreInitializationEvent;
  21. import cpw.mods.fml.common.network.NetworkMod;
  22. import cpw.mods.fml.common.registry.GameRegistry;
  23. import cpw.mods.fml.common.registry.LanguageRegistry;
  24.  
  25. @Mod(modid = "unidye", name = "Unidye", version = "1.1.2")
  26. @NetworkMod(clientSideRequired = true)
  27. public class Unidye {
  28.        
  29.         public static final String modid = "unidye"; //Setting the modid for registerIcons
  30.        
  31.         public static Item woolPart; //Declaring the Items of Unidye
  32.         public static Item uniDye;
  33.         public static Item blueDye;
  34.        
  35.         public static int woolPartID; //Declaring the Item ID of Unidye
  36.         public static int uniDyeID;
  37.         public static int blueDyeID;
  38.        
  39.         public static int dyeOutOfMesh; //Config Variables
  40.         public static int uniDyeOutOfMesh;
  41.         public static boolean blueDyeUsed;
  42.  
  43.  
  44.         // The instance of your mod that Forge uses.
  45.         @Instance(value = "unidye")
  46.         public static Unidye instance;
  47.  
  48.         // Says where the client and server 'proxy' code is loaded.
  49.         @SidedProxy(clientSide = "phnxflms.unidye.client.ClientProxy", serverSide = "phnxflms.unidye.CommonProxy")
  50.         public static CommonProxy proxy;
  51.  
  52.          @EventHandler // used in 1.6.2
  53.          @PreInit
  54.      public void preInit(FMLPreInitializationEvent event) {
  55.              // you will be able to find the config file in .minecraft/config/ and it will be named unidye.cfg
  56.              // here our Configuration has been instantiated, and saved under the name "config"
  57.              Configuration config = new Configuration(event.getSuggestedConfigurationFile());
  58.              
  59.           // loading the configuration from its file
  60.              config.load();
  61.  
  62.           // the NameOfProperty is a String, and the defaultID is an int or Integer
  63.              woolPartID = config.getItem("woolPart", 22022).getInt();
  64.              uniDyeID = config.getItem("uniDye", 22023).getInt();
  65.              blueDyeID = config.getItem("blueDye", 22024).getInt();
  66.              dyeOutOfMesh = config.get(Configuration.CATEGORY_GENERAL, "DyeOutOfMesh", 1).getInt(); //How many Dyes are extracted out of 1 Mesh
  67.              uniDyeOutOfMesh = config.get(Configuration.CATEGORY_GENERAL, "UniDyeOutOfMesh", 1).getInt(); //How much Unidye you get for 1 mesh
  68.              blueDyeUsed = config.get(Configuration.CATEGORY_GENERAL, "BlueDyeUsed", true).getBoolean(true); //If Blue Dye should be used in Unidye instead of Lapis Lazuli
  69.              
  70.              // saving the configuration to its file
  71.              config.save();
  72.      }
  73.  
  74.         @EventHandler // used in 1.6.2
  75.         //@Init
  76.         // used in 1.5.2
  77.         public void load(FMLInitializationEvent event) {
  78.                
  79.                 woolPart = new ItemWoolPart(woolPartID).setUnlocalizedName("woolPart"); //Creating the item Wool Part !!!Line with the Error!!!
  80.                 uniDye = new ItemUnidye(uniDyeID).setUnlocalizedName("uniDye"); //Creating the item uniDye
  81.                 blueDye = new ItemBlueDye(blueDyeID).setUnlocalizedName("blueDye"); // Creating the item blueDye
  82.                
  83.                 LanguageRegistry.addName(uniDye, "Unidye"); // Setting the name for the item uniDye
  84.                 LanguageRegistry.addName(blueDye, "Blue Dye"); // Setting the name for the item blueDye
  85.                 LanguageRegistry.addName(new ItemStack(woolPart, 1, 0), "White Wool Mesh"); //Setting the names for the various metadata configurations of Wool Part
  86.                 LanguageRegistry.addName(new ItemStack(woolPart, 1, 1), "Orange Wool Mesh");
  87.                 LanguageRegistry.addName(new ItemStack(woolPart, 1, 2), "Magenta Wool Mesh");
  88.                 LanguageRegistry.addName(new ItemStack(woolPart, 1, 3), "Light Blue Wool Mesh");
  89.                 LanguageRegistry.addName(new ItemStack(woolPart, 1, 4), "Yellow Wool Mesh");
  90.                 LanguageRegistry.addName(new ItemStack(woolPart, 1, 5), "Lime Wool Mesh");
  91.                 LanguageRegistry.addName(new ItemStack(woolPart, 1, 6), "Pink Wool Mesh");
  92.                 LanguageRegistry.addName(new ItemStack(woolPart, 1, 7), "Gray Wool Mesh");
  93.                 LanguageRegistry.addName(new ItemStack(woolPart, 1, 8), "Light Gray Wool Mesh");
  94.                 LanguageRegistry.addName(new ItemStack(woolPart, 1, 9), "Cyan Wool Mesh");
  95.                 LanguageRegistry.addName(new ItemStack(woolPart, 1, 10), "Purple Wool Mesh");
  96.                 LanguageRegistry.addName(new ItemStack(woolPart, 1, 11), "Blue Wool Mesh");
  97.                 LanguageRegistry.addName(new ItemStack(woolPart, 1, 12), "Brown Wool Mesh");
  98.                 LanguageRegistry.addName(new ItemStack(woolPart, 1, 13), "Green Wool Mesh");
  99.                 LanguageRegistry.addName(new ItemStack(woolPart, 1, 14), "Red Wool Mesh");
  100.                 LanguageRegistry.addName(new ItemStack(woolPart, 1, 15), "Black Wool Mesh");
  101.                
  102.                 if (blueDyeUsed){
  103.                 OreDictionary.registerOre("dyeBlue", new ItemStack(blueDye));
  104.                 }
  105.                 GameRegistry.registerFuelHandler(new UnidyeFuelHandler());
  106.                 UnidyeCrafting.loadRecipes(); // Loads the Recipes from the Class UnidyeCrafting
  107.                
  108.                 proxy.registerRenderers();
  109.         }
  110.  
  111.         @EventHandler // used in 1.6.2
  112.         //@PostInit
  113.         // used in 1.5.2
  114.         public void postInit(FMLPostInitializationEvent event) {
  115.                 // Stub Method
  116.         }
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