示例#1
0
  public static void init(File configFile) {
    Configuration config = new Configuration(configFile);

    try {
      config.load();
      Iterator<String> iter = DynamicMobMapping.entityList.iterator();
      while (iter.hasNext()) {
        String name = iter.next();
        boolean val = config.get("Entity Blacklist", name, false).getBoolean(false);
        if (val) bList.add(name);
      }
      SSRCore.SoulLog.info("SSR: Loaded Entity Blacklist config file.");
    } catch (Exception e) {
      SSRCore.SoulLog.fatal("Soul-Shards Reborn had a problem loading it's configuration files.");
      e.printStackTrace();
    } finally {
      if (config.hasChanged()) config.save();
    }
  }
 public static void init() {
   SSRCore.SoulLog.info("SSR: Registering game objects...");
   GameRegistry.registerBlock(sCage, CageItem.class, sCage.getUnlocalizedName());
   GameRegistry.registerItem(sShard, sShard.getUnlocalizedName());
   GameRegistry.registerTileEntity(CageTile.class, "cage_tile");
   GameRegistry.addShapedRecipe(
       new ItemStack(sCage, 1, 0), "aaa", "a a", "aaa", 'a', Blocks.iron_bars);
   if (SoulConfig.enableEndStoneRecipe)
     GameRegistry.addShapedRecipe(
         new ItemStack(Blocks.end_stone, 2),
         " a ",
         "bcb",
         " a ",
         'a',
         Blocks.stone,
         'b',
         new ItemStack(Blocks.sand, 1, 0),
         'c',
         Items.ender_pearl);
   SSRCore.SoulLog.info("SSR: Done!");
 }