Java 类cpw.mods.fml.common.Mod.Init 实例源码

项目:Oilcraft    文件:Oilcraft.java   
@Init
public void load(FMLInitializationEvent event) {
    OilGenerator oilGenerator = OilGenerator.getInstance();
    LanguageRegistry.addName(oilGenerator, "Oil Generator");
    GameRegistry.registerBlock(oilGenerator, "oilGenerator");
    GameRegistry.registerTileEntity(OilGeneratorTileEntity.class,
            "oilGenerator");

    OilStill oilStill = OilStill.getInstance();
    LanguageRegistry.addName(oilStill, "Oil Still");
    GameRegistry.registerBlock(oilStill, "oilStill");

    OilFlow oilFlow = OilFlow.getInstance();
    LanguageRegistry.addName(oilFlow, "Oil Flow");
    GameRegistry.registerBlock(oilFlow, "oilFlow");

    // liquid world gen stuff
    ReplaceWithLiquidWorldGen liquidWorldGen = new ReplaceWithLiquidWorldGen();
    ToGenerateLiquid oilGen = new ToGenerateLiquid(55, 60, 1, 5, 16, 5,
            OilStill.getInstance().blockID);
    liquidWorldGen.add(oilGen, "oil");
}
项目:HeroezMod    文件:Heroez.java   
@Init
   public void load(FMLInitializationEvent event) {

gameRegistry();
languageRegistry();
setHarvestLevels();
tileEntities();
networkRegisters();

// proxy.registerRenderers();

GameRegistry.registerWorldGenerator(new WorldGeneratorHeroez());

RecipesTabletDecoder.decoding().addSmelting(Block.gravel.blockID,
    new ItemStack(Block.cobblestone, 1, 0), 0.7F);

   }
项目:AltEnergy    文件:AltEnergy.java   
@Init
public void init(FMLInitializationEvent event) {

    log(Level.INFO, "Initializing " + Reference.MOD_ID + " version: " + meta.version);

    proxy.registerTileEntities();

    proxy.initRenderingAndTextures();

    /*
     * if (!useUeVoltageSensitivity) {
     * UniversalElectricity.isVoltageSensitive = true;
     * //EELogger.finest("Successfully toggled Voltage Sensitivity!");
     * }
     */

    UniversalElectricity.isNetworkActive = true;

    DimensionManager.registerProviderType(DimensionIds.TERRA, WorldProviderTerra.class, false);
    DimensionManager.registerDimension(DimensionIds.TERRA, DimensionIds.TERRA);
}
项目:HexxitGear    文件:HexxitGear.java   
@Init
public void init(FMLInitializationEvent evt) {
    hexbiscus = new BlockHexbiscus(HexxitGearConfig.hexbiscus.getInt());

    tribalHelmet = new ItemTribalArmor(HexxitGearConfig.tribalHelmetId.getInt(), proxy.addArmor("tribal"), 0).setUnlocalizedName("hexxitgear.tribal.helmet");
    tribalChest = new ItemTribalArmor(HexxitGearConfig.tribalChestId.getInt(), proxy.addArmor("tribal"), 1).setUnlocalizedName("hexxitgear.tribal.chest");
    tribalLeggings = new ItemTribalArmor(HexxitGearConfig.tribalLeggingsId.getInt(), proxy.addArmor("tribal"), 2).setUnlocalizedName("hexxitgear.tribal.leggings");
    tribalShoes = new ItemTribalArmor(HexxitGearConfig.tribalShoesId.getInt(), proxy.addArmor("tribal"), 3).setUnlocalizedName("hexxitgear.tribal.boots");
    scaleHelmet = new ItemScaleArmor(HexxitGearConfig.scaleHelmetId.getInt(), proxy.addArmor("scale"), 0).setUnlocalizedName("hexxitgear.scale.helmet");
    scaleChest = new ItemScaleArmor(HexxitGearConfig.scaleChestId.getInt(), proxy.addArmor("scale"), 1).setUnlocalizedName("hexxitgear.scale.chest");
    scaleLeggings = new ItemScaleArmor(HexxitGearConfig.scaleLeggingsId.getInt(), proxy.addArmor("scale"), 2).setUnlocalizedName("hexxitgear.scale.leggings");
    scaleBoots = new ItemScaleArmor(HexxitGearConfig.scaleBootsId.getInt(), proxy.addArmor("scale"), 3).setUnlocalizedName("hexxitgear.scale.boots");
    thiefHelmet = new ItemThiefArmor(HexxitGearConfig.thiefHelmetId.getInt(), proxy.addArmor("thief"), 0).setUnlocalizedName("hexxitgear.thief.helmet");
    thiefChest = new ItemThiefArmor(HexxitGearConfig.thiefChestId.getInt(), proxy.addArmor("thief"), 1).setUnlocalizedName("hexxitgear.thief.chest");
    thiefLeggings = new ItemThiefArmor(HexxitGearConfig.thiefLeggingsId.getInt(), proxy.addArmor("thief"), 2).setUnlocalizedName("hexxitgear.thief.leggings");
    thiefBoots = new ItemThiefArmor(HexxitGearConfig.thiefBootsId.getInt(), proxy.addArmor("thief"), 3).setUnlocalizedName("hexxitgear.thief.boots");

    hexicalEssence = new ItemHexicalEssence(HexxitGearConfig.hexicalEssence.getInt());
    hexicalDiamond = new ItemHexicalDiamond(HexxitGearConfig.hexicalDiamond.getInt());

    GameRegistry.registerBlock(hexbiscus, hexbiscus.getUnlocalizedName());

    GameRegistry.registerWorldGenerator(new HGWorldGen());

    proxy.init();
}
项目:PowerConverters-RPModule    文件:RPModule.java   
@Init
public void Init(FMLInitializationEvent e)
{
    converterBlockRedPower = new BlockPowerConverterRedPower(blockIdRedPower);
    GameRegistry.registerBlock(converterBlockRedPower, ItemBlockPowerConverterRedPower.class, "blockPowerConverterRedPower");
    GameRegistry.registerTileEntity(TileEntityRedPowerConsumer.class, "powerConverterRP2Consumer");
    GameRegistry.registerTileEntity(TileEntityRedPowerProducer.class, "powerConverterRP2Producer");
    LanguageRegistry.addName(new ItemStack(converterBlockRedPower, 1, 0), "RP2 Consumer");
    LanguageRegistry.addName(new ItemStack(converterBlockRedPower, 1, 1), "RP2 Producer");

    GameRegistry.addRecipe(new ItemStack(converterBlockRedPower, 1, 0),
            "G G", "ROR", "G G",
            Character.valueOf('G'), Item.ingotGold,
            Character.valueOf('R'), Item.redstone,
            Character.valueOf('O'), Block.obsidian);

    GameRegistry.addShapelessRecipe(new ItemStack(converterBlockRedPower, 1, 1), new ItemStack(converterBlockRedPower, 1, 0));
    GameRegistry.addShapelessRecipe(new ItemStack(converterBlockRedPower, 1, 0), new ItemStack(converterBlockRedPower, 1, 1));



    proxy.load();
}
项目:ShoulderSurfing    文件:ShoulderSurfing.java   
@Init
public void load(FMLInitializationEvent event) {
    //load the keyboard bindings
    kbh = ShoulderKeybindings.registerKeybindings();

    //create mc pointer
    mc = ModLoader.getMinecraftInstance();

    //create tick handler
    st = new ShoulderTickHandler();
    TickRegistry.registerTickHandler(st, Side.CLIENT);
}
项目:forge_world_downloader    文件:Modloader.java   
@Init       // used in 1.5.2
public void load(FMLInitializationEvent event) {
    //proxy.registerKeyBindings();
    TickRegistry.registerTickHandler(tickHandler, Side.CLIENT);
    NetworkRegistry.instance().registerConnectionHandler(new WDLConnectionHandler());
    System.err.println("WDL loaded");
    instance = this;
}
项目:UrbanCraft-CommandForwarder    文件:CommandForwarder.java   
@Init
public void load(FMLInitializationEvent event) {
    // GameRegistry.registerPlayerTracker(new PlayerTracker());
    TickRegistry.registerTickHandler(new TickHandler(), Side.SERVER);
    // MinecraftForge.EVENT_BUS.register(new EventHandler());
    logger.info("Loaded.");
}
项目:MineTech    文件:MineTechPlus.java   
@Init
public void initMod(FMLInitializationEvent e){
    items = new ItemHandler(config);
    blocks = new BlockHandler(config);
    crafting = new CraftingHandler();
    GameRegistry.registerTileEntity(me.aronth.minetechplus.blocks.tileentitys.TileWorkstation.class, "MineTech:Workstation");
    GameRegistry.registerTileEntity(me.aronth.minetechplus.blocks.tileentitys.TileIdeaBuilder.class, "MineTech:IdeaBuilder");
    GameRegistry.registerTileEntity(me.aronth.minetechplus.blocks.tileentitys.TileCraftingTable.class, "MineTech:CraftingTable");
    GameRegistry.registerTileEntity(me.aronth.minetechplus.blocks.tileentitys.TileDualFurnace.class, "MineTech:DualFurnace");
    GameRegistry.registerTileEntity(me.aronth.minetechplus.blocks.tileentitys.TileSuperContainer.class, "MineTech:SuperContainer");
    proxy.addNames();
    proxy.registerHandlers();
}
项目:MMOMats    文件:MMOMats.java   
@Init
public void load(FMLInitializationEvent event) {
    NetworkRegistry.instance().registerGuiHandler(instance, proxy);

    proxy.registerTileEntities();
    proxy.initRenderingAndTextures();
}
项目:EnhancedBooks    文件:BooksCore.java   
@Init
public void initBooks(FMLInitializationEvent event) { // Main init method
    proxy.registerRenderInformation();
    proxy.registerEntities();
    proxy.registerItems();
    proxy.registerTileEntities(); // Myah
    proxy.registerBlocks(); //Calls the registerBlocks method
    proxy.addNames(); // Whatever
    proxy.addRecipes(); // Etc
    NetworkRegistry.instance().registerGuiHandler(this, new GuiHandler()); // Registers the class that deals with GUI data
}
项目:SimplePowerStorage    文件:SimplePowerStorage.java   
@Init
public void init(FMLInitializationEvent evt) {
    makeshiftBattery = new BlockMakeshiftBattery(SPSConfig.makeshiftBatteryId.getInt());
    if (Loader.isModLoaded("ThermalExpansion")) {
        makeshiftConductance = new ItemMakeshiftConductanceCoil(SPSConfig.conductanceCoilId.getInt());
    }
    makeshiftUpgrade = new ItemMakeshiftUpgrade(SPSConfig.makeshiftUpgradeId.getInt());

    GameRegistry.registerBlock(makeshiftBattery, makeshiftBattery.getUnlocalizedName());

    GameRegistry.registerTileEntity(TileEntityMakeshiftBattery.class, "entityMSBattery");

    NetworkRegistry.instance().registerGuiHandler(this, new GuiHandler());
}
项目:NetCraft    文件:NetCraft.java   
@SuppressWarnings("unchecked")
@Init
public void load(FMLInitializationEvent event) {

    // Register the GUI Handler
    // NetworkRegistry.instance().registerGuiHandler(instance, proxy);

    // Initialize mod tile entities
    proxy.registerTileEntities();

    // Initialize custom rendering and pre-load textures (Client only)
    proxy.initRenderingAndTextures();

    CraftingManager.getInstance().getRecipeList().add(new RecipesArcPad());
}
项目:Minecraft_on_Fire    文件:MOF.java   
@Init
public void load(FMLInitializationEvent event){

    proxy.registerRenderers();
    items = new ItemHandler(config);
    blocks = new BlockHandler(config);
    crafting = new CraftingHandler();
    proxy.addNames();

}
项目:Badger-Mod    文件:BadgerMod.java   
@Init
public void load(FMLInitializationEvent event) 
{       
    GameRegistry.registerBlock(lavaBrick, "lavaBrick");

    LanguageRegistry.addName(lavaBrick, "Lava Brick");
}
项目:Fuelsmod    文件:FuelsMod.java   
@Init
public void load(FMLInitializationEvent event) {

    GameRegistry.registerWorldGenerator(new WorldGenerator());
    NetworkRegistry.instance().registerGuiHandler(instance, proxy);
    playerTracker = new PlayerHandler();
    GameRegistry.registerPlayerTracker(playerTracker);
    MinecraftForge.EVENT_BUS.register(playerTracker);
    proxy.registerTileEntities();
    ModLoaded.Mod_Loaded();

}
项目:QuestCraft    文件:QuestCraft.java   
@Init
public void load(FMLInitializationEvent event) {
    proxy.registerRenderers();

    questInstanceItem = new QuestInstanceItem(questInstanceItemID);
    questInstanceItem.registerRecipes();

    questInstanceItemEventListener = new QuestInstanceItemEventListener();
    MinecraftForge.EVENT_BUS.register(questInstanceItemEventListener);
}
项目:Andrew2448PowersuitAddons    文件:ModularPowersuitsAddons.java   
@Init
public void load(FMLInitializationEvent event) {
    //book = new ItemBook(AddonConfig.manualID);
    AddonComponent.populate();
    AddonConfig.loadPowerModules();
    Localization.loadCurrentLanguage();
    AddonConfig.loadOptions();
    proxy.registerHandlers();
    NetworkRegistry.instance().registerGuiHandler(this, guiHandler);
}
项目:Reliquary    文件:Reliquary.java   
@Init
public void load(FMLInitializationEvent event) {
    proxy.registerEntityTrackers();
    proxy.registerRenderers();
    proxy.registerEvents();
    proxy.registerTileEntities();
    //LanguageRegistry.instance().addStringLocalization("itemGroup." + Reference.MOD_ID, "Xeno's Reliquary");
}
项目:paleocraft    文件:PaleoCraft.java   
@Init
public void load(FMLInitializationEvent event) {
    NetworkRegistry.instance().registerGuiHandler(this, proxy);

    proxy.registerTileEntities();
    proxy.initRenderingAndTextures();
}
项目:Kitchenmod    文件:KitchenMod.java   
@Init
public void init(FMLInitializationEvent event){

    MinecraftForge.EVENT_BUS.register(new BonemealHandler());

    proxy.registerRenders();
    NetworkRegistry.instance().registerGuiHandler(this, new GuiHandler());
    GameRegistry.registerTileEntity(TileEntityStove.class, "containerStove");
}
项目:secri    文件:Maeme.java   
@Init
public void load(FMLInitializationEvent event) {
    NetworkRegistry.instance().registerGuiHandler(instance, proxy);
    proxy.registerKeyBindings();
    proxy.registerRenderers();
    proxy.registerInteractions();
    EntityRegistry.registerModEntity(EntityPokeBall.class, "Pokeball", MaemeConfig.idPokeball, Maeme.instance, 80, 1, true);

    NetworkRegistry.instance().registerConnectionHandler(new ConnectionHandler());

    GameRegistry.registerWorldGenerator(new WorldGenLeafStoneOre());
    GameRegistry.registerWorldGenerator(new WorldGenWaterStoneOre());
    GameRegistry.registerWorldGenerator(new WorldGenThunderStoneOre());
    GameRegistry.registerWorldGenerator(new WorldGenFireStoneOre());
    GameRegistry.registerWorldGenerator(new WorldGenFossils());
    GameRegistry.registerWorldGenerator(new WorldGenEvolutionRock());

    // MinecraftForge.EVENT_BUS.register(new MigrationLoader());
    MinecraftForge.EVENT_BUS.register(MaemeStorage.CardManager);
    MinecraftForge.EVENT_BUS.register(MaemeStorage.ComputerManager);
    MinecraftForge.EVENT_BUS.register(new EntitySpawning());

    TickRegistry.registerTickHandler(new TickHandler(), Side.CLIENT);
    TickRegistry.registerTickHandler(new SleepHandler(), Side.SERVER);
    TickRegistry.registerTickHandler(new TickHandler(), Side.SERVER);
    TickRegistry.registerTickHandler(new MaemeSpawner(), Side.SERVER);
    proxy.registerTickHandlers();
}
项目:Power_Storage-MC1.4.7    文件:PowerStorage.java   
/***
    * This is code that is executed when your mod is being initialized in Minecraft
    * Examples of code that could be run here;
    * 
    * Registering your GUI Handler
    * Registering your different event listeners
    * Registering your different tile entities
    * Adding in any recipes you have 
    * 
    * @param event The Forge ModLoader initialization event
    */

@Init
public void load(FMLInitializationEvent event) {
    proxy.registerRenderers();

    initCraftingAndSmelting();
    initBasicItems();
    initBasicBlocks();
    initBasicPipes();
    initBasicLiquids();
    initWorldGen();

}
项目:AdvancedBackpackMod    文件:AdvancedBackpackMod.java   
@Init
public void load(FMLInitializationEvent event) {

    proxy.registerRenderers();  
    //MinecraftForge.EVENT_BUS.register(new HandlePickup());

    baseBackpack = new ItemBackpackBase(ConfigurationStore.BACKPACK_BASE_ID - 256).setUnlocalizedName("Bag of Holding");
    LanguageRegistry.addName(baseBackpack, "Bag of Holding");           
    magicBackpack = new ItemBackpackMagic(ConfigurationStore.BACKPACK_MAGIC_ID - 256).setUnlocalizedName("Portable Pocketdimension");
    LanguageRegistry.addName(magicBackpack, "Portable Pocketdimension");    
    powerCore = new ItemNetherPowerCore(ConfigurationStore.BACKPACK_POWERCORE_ID - 256).setUnlocalizedName("Nether Power Core");
    LanguageRegistry.addName(powerCore, "Nether Power Core");
    diamondEye = new ItemDiamondEye(ConfigurationStore.BACKPACK_DIAMONDEYE_ID - 256).setUnlocalizedName("Diamond-encased Eye of Ender");
    LanguageRegistry.addName(diamondEye, "Diamond-encased Eye of Ender");

    NetworkRegistry.instance().registerGuiHandler(instance, proxy);

    GameRegistry.addRecipe(new ItemStack(baseBackpack), "aba", "aca", "ada", 'a', new ItemStack(Item.leather),
            'b', new ItemStack(Item.enderPearl), 'c', new ItemStack(Block.chest), 'd', new ItemStack(Item.emerald));

    if (ConfigurationStore.BACKPACK_ENABLE_EASIER_RECIPES)
    {
        GameRegistry.addRecipe(new ItemStack(magicBackpack), "aba", "aca", "ada", 'a', new ItemStack(Item.leather),
                'b', new ItemStack(Item.enderPearl), 'c', new ItemStack(Block.enderChest), 'd', new ItemStack(diamondEye));
        GameRegistry.addRecipe(new ItemStack(diamondEye), "aaa", "aba", "aaa", 'a', new ItemStack(Item.diamond), 'b', new ItemStack(Item.eyeOfEnder));
    }
    else
    {
        GameRegistry.addRecipe(new ItemStack(magicBackpack), "aba", "aca", "ada", 'a', new ItemStack(Item.leather),
            'b', new ItemStack(Item.enderPearl), 'c', new ItemStack(Block.enderChest), 'd', new ItemStack(powerCore));
        GameRegistry.addRecipe(new ItemStack(powerCore, ConfigurationStore.BACKPACK_RECIPE_CORES_PER_CRAFT), "aaa", "aba", "aaa", 
                'a', new ItemStack(Item.redstone), 'b', new ItemStack(Item.netherStar));
    }

    CraftingManager.getInstance().getRecipeList().add(new RecipeExtendBackpackBase());
    CraftingManager.getInstance().getRecipeList().add(new RecipeExtendBackpackMagic());
    CraftingManager.getInstance().getRecipeList().add(new RecipeColorBackpack());
}
项目:OldMods    文件:OldBooks.java   
@Init
public void init( FMLInitializationEvent event )
{
    addRecipes();
}
项目:ForestryLegacy    文件:Forestry.java   
@Init
public void init(FMLInitializationEvent event) {
    core.init(this);
}
项目:UrbanCraft-KnownPlayers    文件:KnownPlayers.java   
@Init
public void load(FMLInitializationEvent event) {
    GameRegistry.registerPlayerTracker(new PlayerTracker());
    logger.info("Loaded.");
}
项目:Stereoscopic3D-for-Minecraft    文件:Stereoscopic3D.java   
@SideOnly(Side.CLIENT)
@Init
public void load(FMLInitializationEvent event)
{
    renderer.engage();
}
项目:deep-storage-tanks    文件:DeepStorageTanks.java   
@Init       // used in 1.5.2
public void load(FMLInitializationEvent event) {
    Logger myLog = FMLLog.getLogger();
    myLog.setLevel(java.util.logging.Level.FINEST);
    myLog.log(java.util.logging.Level.FINEST, "DST TEST");

    LanguageRegistry.addName(blockDeepStorageTank, "Deep Storage Tank");
    MinecraftForge.setBlockHarvestLevel(blockDeepStorageTank, "pickaxe", 0);
    GameRegistry.registerBlock(blockDeepStorageTank, "deepStorageTank");

    GameRegistry.registerTileEntity(lendrick.deepstoragetanks.tile.TileEntityDeepStorageTank.class, "deepStorageTank");


    //GameData.dumpRegistry(Minecraft.getMinecraftDir());

    Item machineBlock = findItem("item.mfr.machineblock");
    Block tesseract = findBlock("tile.thermalexpansion.tesseract");
    Block bcTank = findBlock("tile.tankBlock");

    /*
    // One would think that dumping the game registry would work, but it doesn't seem to have all the blocks in it.
    for(Block b : Block.blocksList){
        if(b != null) {
            myLog.log(Level.INFO, String.format("Block %d: %s / %s", b.blockID, b.getClass().getName(), b.getUnlocalizedName()));
        }
    }

    for(Item b : Item.itemsList){
        if(b != null) {
            myLog.log(Level.INFO, String.format("Item %d: %s / %s", b.itemID, b.getClass().getName(), b.getUnlocalizedName()));
        }
    }
    */

    ItemStack dstStack = new ItemStack(deepStorageTankBlockID, 1, 0);

    if(bcTank != null && machineBlock != null && tesseract != null) {
        ItemStack liquidTesseract = new ItemStack(tesseract, 1, 1);
    GameRegistry.addRecipe(new ShapedOreRecipe(dstStack, new Object[]
{
"GGG",
"LTL",
"EME",
'G', "sheetPlastic",
'L', liquidTesseract,
'E', Item.eyeOfEnder,
'T', bcTank, //bcTank.blockID,
'M', machineBlock
} ));
    }

    NetworkRegistry.instance().registerGuiHandler(this, new GuiHandlerDeepStorageTank());

    proxy.registerRenderers();
}
项目:Sojourn    文件:Sojourn.java   
@EventHandler
public void Init(FMLInitializationEvent event)
{
    proxy.init(event);
}
项目:PilesOfBlocks    文件:PilesOfBlocks.java   
@Init
public void load(FMLInitializationEvent event) {
    proxy.registerRenderers();

    config.load();

    config.addCustomCategoryComment(ConfigCategory_Generic,
            "All generic settings for questcraft");
    config.addCustomCategoryComment(
            ConfigCategory_Blocks,
            "Rules for all blocks that should be affected by this.\n"
                    + "All rules have a name of Bi_xyz where i is an integer counting up from 0.\n"
                    + "Each rule has to have a name _Name (eg. B42_Name) that is a regular expression for matching blocks to the rule.\n"
                    + "Additional information for the rules include any of the following:\n"
                    + "  _MetaData: overrides the metadata to give to the block when it pops\n"
                    + "  _StackSize: overrides the maximum allowed stacksize for blockitems matching the rule\n");


    Property defaultMetaDataProp = config.get(ConfigCategory_Generic,
            "defaultMetaData", "-1");
    defaultMetaDataProp.comment = "The meta value to assign blocks that a placed back in world."
            + "Default -1 uses the same as from the given item ID."
            + "255 is needed for blocks with dual states in the BlockPhysics mod";
    defaultMetaData = defaultMetaDataProp.getInt(-1);

    Property printBlockItemInfoProp = config.get(ConfigCategory_Generic,
            "printBlockInfo", "false");
    printBlockItemInfoProp.comment = "Print a chat message whenver a blockitem is picked up with the corresponding name of the block used for making rules. Default false";
    printBlockItemInfo = printBlockItemInfoProp.getBoolean(false);

    Property defaultStackSizeProp = config.get(ConfigCategory_Generic,
            "defaultStackSize", "1");
    defaultStackSizeProp.comment = "The default maximum size of any of the stacks that are listen in the blocks section, may be overridden for individual blocks";
    defaultStackSize = defaultStackSizeProp.getInt(1);

    Property defaultMinPopTimeProp = config.get(ConfigCategory_Generic,
            "defaultMinPopTime", "20");
    defaultMinPopTimeProp.comment = "The default minimum time (in ticks) before an itemstack matched by the rules will pop-out to become a block";
    defaultMinPopTime = defaultMinPopTimeProp.getInt(20);

    Property defaultMaxPopTimeProp = config.get(ConfigCategory_Generic,
            "defaultMaxPopTime", "20");
    defaultMaxPopTimeProp.comment = "The default minimum time (in ticks) before an itemstack matched by the rules will pop-out to become a block";
    defaultMaxPopTime = defaultMaxPopTimeProp.getInt(20);

    for(nRules=0;nRules<256;) {
        Property nameProp = config.get(ConfigCategory_Blocks, "B"
                + nRules + "_Name", "");
        Property metaDataProp = config.get(ConfigCategory_Blocks, "B"
                + nRules + "_MetaData", "");
        Property stackSizeProp = config.get(ConfigCategory_Blocks, "B"
                + nRules  + "_MaxStackSize", "");
        Property minPopTimeProp = config.get(ConfigCategory_Blocks, "B"
                + nRules + "_MinPopTime", "");
        Property maxPopTimeProp = config.get(ConfigCategory_Blocks, "B"
                + nRules + "_MaxPopTime", "");

        if (nameProp == null || nameProp.value.equals(""))
            break;

        Rule r = new Rule();
        r.blockName = nameProp.value;
        if(metaDataProp.value == "") r.metaData = -2;
        else r.metaData = metaDataProp.getInt(-2);
        if(stackSizeProp.value == "") r.stackSize = -2;
        else r.stackSize = stackSizeProp.getInt(-2);
        if(minPopTimeProp.value == "") r.minPopTime = -2;
        else r.minPopTime = minPopTimeProp.getInt(-2);
        if(maxPopTimeProp.value == "") r.maxPopTime = -2;
        else r.maxPopTime = maxPopTimeProp.getInt(-2);
        rules[nRules++] = r;
    }

    System.out.println("Finished loading settings, "+nRules+" rules found");
    config.save();

    eventListener = new EventListener();
    MinecraftForge.EVENT_BUS.register(eventListener);       
}
项目:FallingEarth    文件:FallingEarth.java   
@Init
public void Init(FMLInitializationEvent event)
{
    proxy.init(event);
}
项目:BlackTower    文件:BlackTower.java   
@Init
public void load(FMLInitializationEvent event) {
        //proxy.registerRenderers();
}
项目:ObsidiCraft    文件:ObsidiCraft.java   
@Init
public void load(FMLInitializationEvent event) 
{

}
项目:GoblinTribes    文件:GoblinTribes.java   
@Init
public void load(FMLInitializationEvent event) {
    proxy.registerEntities();
    proxy.registerRenderers();
    proxy.registerLanguage();
}
项目:Electric-Fishing-Pole-2    文件:ElectricFish.java   
@Init
public void init(FMLInitializationEvent event) {
    ModItems.init(event);
    ElectricFishCrafting.init();
}
项目:Thaumic-Tools    文件:TTCore.java   
@Init
public void load(FMLInitializationEvent event) {
        proxy.registerRenderers();

}
项目:OreLiners    文件:OreLiners.java   
@Init
public void init(FMLInitializationEvent event) {
    GameRegistry.registerWorldGenerator(new WorldGenerator());

       OreLinersRegistry.registerGenerator(new VanillaGenerator());
}
项目:secri    文件:mod_HDSkins.java   
@Init
public void load(FMLInitializationEvent event) {
    System.out.println("HD Skins v4.0 for Minecraft 1.4.2 loaded"); 
}
项目:WoodworkingTFC    文件:WoodworkingTFC.java   
@Init
public void load(FMLInitializationEvent event)
{
    // setup blocks
    int nextBlock = 3166;
    carvingBench = new CarvingBench(nextBlock++);
    GameRegistry.registerBlock(carvingBench, carvingBench.getUnlocalizedName());

    // setup items
    int nextItem = 13166;
    weaponizedWood = EnumHelper.addToolMaterial("weaponizedWood", 1, 40, 1.0f, 85, 1);
    woodenClub = new WoodenClub(nextItem++, weaponizedWood);
    stoneWoodworkingKnifeHead = new StoneWoodworkingKnifeHead(nextItem++);
    stoneWoodworkingKnife = new StoneWoodworkingKnife(nextItem++, TFCItems.IgExToolMaterial);
    woodenCarving = new WoodenCarving(nextItem++);
    fingerPaint = new FingerPaint(nextItem++);

    // knapping tool heads
    CraftingManagerTFC craftTFC = CraftingManagerTFC.getInstance();
    craftTFC.addRecipe(new ItemStack(stoneWoodworkingKnifeHead), new Object[] {
        " X", "XX", "XX", "XX", 'X', new ItemStack(TFCItems.FlatRock, 1, 32767)
    });

    // tools (head + stick)
    GameRegistry.addRecipe(new ItemStack(stoneWoodworkingKnife), "X", "I",
        'X', new ItemStack(stoneWoodworkingKnifeHead), 'I', new ItemStack(Item.stick));

    // club (wood carving)
    CarvingRecipe.add(woodenClub.itemID, 1, false,
        "   XX",
        "  XXX",
        " XXX",
        " XX",
        "X");

    // carving bench (wood carving)
    CarvingRecipe.add(carvingBench.blockID, 1, false,
        "XXXXX",
        "X   X",
        "X   X",
        "X   X",
        "X   X");

    // wooden bowl (wood carving)
    CarvingRecipe.add(Item.bowlEmpty.itemID, 4, false,
        "X  X",
        "XXXX");

    // finger paints
    int ii;
    for(ii=0; ii<16; ++ii)
    {
        GameRegistry.addShapelessRecipe(new ItemStack(fingerPaint.itemID, 16, ii),
            new ItemStack(Item.bowlEmpty), new ItemStack(Item.dyePowder, 1, ii));
    }

    // gui handler
    NetworkRegistry.instance().registerGuiHandler(this, new GuiHandler());

    // crafting handler
    GameRegistry.registerCraftingHandler(new CraftingHandler());

    // rendering setup
    proxy.setupRenderers();
}