@Deprecated public static void initiate() { CONFIGURATION.load(); USE_FUEL = CONFIGURATION .get(Configuration.CATEGORY_GENERAL, "Use Fuel", Settings.USE_FUEL) .getBoolean(Settings.USE_FUEL); LOAD_CHUNKS = Settings.CONFIGURATION .get(Configuration.CATEGORY_GENERAL, "Allow Chunk Loading", LOAD_CHUNKS) .getBoolean(LOAD_CHUNKS); DAO_DAN_ZUI_YUAN = Settings.CONFIGURATION .get(Configuration.CATEGORY_GENERAL, "Max Missile Distance", Settings.DAO_DAN_ZUI_YUAN) .getInt(Settings.DAO_DAN_ZUI_YUAN); ANTIMATTER_SIZE = Settings.CONFIGURATION .get(Configuration.CATEGORY_GENERAL, "Antimatter Explosion Size", ANTIMATTER_SIZE) .getInt(ANTIMATTER_SIZE); DESTROY_BEDROCK = Settings.CONFIGURATION .get(Configuration.CATEGORY_GENERAL, "Antimatter Destroy Bedrock", DESTROY_BEDROCK) .getBoolean(DESTROY_BEDROCK); MAX_ROCKET_LAUCNHER_TIER = Settings.CONFIGURATION .get( Configuration.CATEGORY_GENERAL, "Limits the max missile tier for rocket launcher item", MAX_ROCKET_LAUCNHER_TIER) .getInt(MAX_ROCKET_LAUCNHER_TIER); CONFIGURATION.save(); }
@EventHandler public void postInit(FMLPostInitializationEvent evt) { ConfigHandler.configure(Settings.CONFIGURATION, "resonantinduction"); // Generate Resources ResourceGenerator.generateOreResources(); proxy.postInit(); Settings.CONFIGURATION.save(); }
@EventHandler public void preInit(FMLPreInitializationEvent evt) { ResonantInduction.LOGGER.setParent(FMLLog.getLogger()); NetworkRegistry.instance().registerGuiHandler(this, proxy); Modstats.instance().getReporter().registerMod(this); Settings.CONFIGURATION.load(); // Register Forge Events MinecraftForge.EVENT_BUS.register(ResourceGenerator.INSTANCE); MinecraftForge.EVENT_BUS.register(new TextureHookHandler()); blockMachinePart = contentRegistry.createBlock(BlockMachineMaterial.class, ItemBlockMetadata.class); /** Melting dusts */ blockDust = contentRegistry .createBlock("dust", BlockDust.class, null, TileDust.class) .setCreativeTab(null); blockRefinedDust = contentRegistry .createBlock("refinedDust", BlockDust.class, null, TileDust.class) .setCreativeTab(null); // Items itemRubble = new ItemOreResource(Settings.getNextItemID("oreRubble"), "oreRubble"); itemDust = new ItemOreResource(Settings.getNextItemID("oreDust"), "oreDust"); itemRefinedDust = new ItemOreResource(Settings.getNextItemID("oreRefinedDust"), "oreRefinedDust"); itemBucketMixture = new ItemOreResourceBucket(Settings.getNextItemID("bucketMixture"), "bucketMixture", false); itemBucketMolten = new ItemOreResourceBucket(Settings.getNextItemID("bucketMolten"), "bucketMolten", true); itemBiomass = contentRegistry.createItem(ItemBiomass.class); GameRegistry.registerItem(itemRubble, itemRubble.getUnlocalizedName()); GameRegistry.registerItem(itemDust, itemDust.getUnlocalizedName()); GameRegistry.registerItem(itemRefinedDust, itemRefinedDust.getUnlocalizedName()); GameRegistry.registerItem(itemBucketMixture, itemBucketMixture.getUnlocalizedName()); GameRegistry.registerItem(itemBucketMolten, itemBucketMolten.getUnlocalizedName()); // Already registered with ContentRegistry // GameRegistry.registerTileEntity(TileMaterial.class, "ri_material"); GameRegistry.registerTileEntity(TileFluidMixture.class, "ri_fluid_mixture"); proxy.preInit(); TabRI.ITEMSTACK = new ItemStack(blockMachinePart); }
public static void initiate() { USE_FUEL = CONFIGURATION.get(Configuration.CATEGORY_GENERAL, "Use Fuel", true).getBoolean(true); LOAD_CHUNKS = Settings.CONFIGURATION .get(Configuration.CATEGORY_GENERAL, "Allow Chunk Loading", true) .getBoolean(true); MAX_MISSILE_DISTANCE = Settings.CONFIGURATION .get(Configuration.CATEGORY_GENERAL, "Max Missile Distance", 10000) .getInt(10000); ANTIMATTER_SIZE = Settings.CONFIGURATION .get(Configuration.CATEGORY_GENERAL, "Antimatter Explosion Size", 55) .getInt(55); DESTROY_BEDROCK = Settings.CONFIGURATION .get(Configuration.CATEGORY_GENERAL, "Antimatter Destroy Bedrock", true) .getBoolean(true); MAX_ROCKET_LAUNCHER_TIER = Settings.CONFIGURATION .get(Configuration.CATEGORY_GENERAL, "Rocket Launcher Max Missile Tier", 2) .getInt(2); GENERATE_SULFUR = Settings.CONFIGURATION .get(Configuration.CATEGORY_GENERAL, "Generate Sulfur Ore", true) .getBoolean(true); MAX_REDMATTER_LIFESPAN = Settings.CONFIGURATION .get(Configuration.CATEGORY_GENERAL, "RedMatter Life Span in ticks", 3600) .getInt(3600); DO_REDMATTER_DESPAWN = Settings.CONFIGURATION .get(Configuration.CATEGORY_GENERAL, "RedMatter despawn", true) .getBoolean(true); CREEPER_DROP_SULFUR = Settings.CONFIGURATION .get(Configuration.CATEGORY_GENERAL, "Creepers Drop Sulfur", true) .getBoolean(true); CREEPER_BLOW_UP_IN_FIRE = Settings.CONFIGURATION .get(Configuration.CATEGORY_GENERAL, "Creepers Blow up in Fire", true) .getBoolean(true); POLLUTIVE_NUCLEAR = Settings.CONFIGURATION .get(Configuration.CATEGORY_GENERAL, "Pollutive Nuclear", true) .getBoolean(true); CREATE_NETHERRACK = Settings.CONFIGURATION .get(Configuration.CATEGORY_GENERAL, "Exothermic Create Netherrack", true) .getBoolean(true); REDUCE_OBSIDIAN_RESISTANCE = Settings.CONFIGURATION .get(Configuration.CATEGORY_GENERAL, "Reduce Obsidian Resistance", 45F) .getDouble(45F); }