Package net.minecraftforge.common

Examples of net.minecraftforge.common.Configuration.save()


    c.load();
   
    doUpdateCheck = c.get(Configuration.CATEGORY_GENERAL, "EnableUpdateCheck", true);
    doUpdateCheck.comment = "Set to false to disable update checks for all Power Crystals' mods.";
   
    c.save();
  }

  @Override
  public String getModId()
  {
View Full Code Here


    if (tickRateStorage <= 0)
      tickRateStorage = 20;

    debug = config.get("Dev Options", "showFluidsInMETerminal", false, "Dont't activate if you dont want to debug stuff ;)").getBoolean(false);
    shortenedBuckets = config.get("Render Options", "shortenBucketsInTerminal", true, "Do you want to show 1kB or 1000000mB?").getBoolean(true);
    config.save();
  }

  @EventHandler
  public void init(FMLInitializationEvent event)
  {
View Full Code Here

        {
          Configuration oldconfig = new Configuration(oldFile);
          oldconfig.load();
          blockIDAdvPwrMan = oldconfig.get(configuration.CATEGORY_BLOCK, "ChargingBench", blockIDAdvPwrMan).getInt();
          Info.isDebugging = (oldconfig.get(configuration.CATEGORY_GENERAL, "debug",  Info.isDebugging).getBoolean(Info.isDebugging));
          oldconfig.save();
          boolean success = oldFile.delete();
          if (success)
          {
            FMLLog.getLogger().info(Info.TITLE_LOG + "Done with old config file.");
          }
View Full Code Here

    Configuration c = new Configuration(configFile);
   
    spyglassRange = c.get(Configuration.CATEGORY_GENERAL, "SpyglassRange", 200);
    spyglassRange.comment = "The maximum number of blocks the spyglass and ruler can look to find something. This calculation is performed only on the client side.";
   
    c.save();
  }
 
  public static void loadCommonConfig(File configFile)
  {
    Configuration c = new Configuration(configFile);
View Full Code Here

    for(Machine machine : Machine.values())
    {
      machine.load(c);
    }
   
    c.save();
  }
 
}
View Full Code Here

  {
    System.out.println("Initializing Colonies " + Version());
    Configuration config = new Configuration(event.getSuggestedConfigurationFile());
    config.load();
    setConfig(config);
    config.save();
    MinecraftForge.EVENT_BUS.register(new ColoniesSoundManager());
    MinecraftForge.EVENT_BUS.register(new AncientTomeDropsEvent());
  }

  @Init
View Full Code Here

                        }
                    }
                }
            }
            if (config1 != null) {
                config1.save();
            }
        }
    }

    @Override
View Full Code Here

        engineId.comment = "Block Id of Engine blocks";
        usefullthingsblockId = firstblockId.getInt(200);
        luminolampBlockId = luminolampId.getInt(201);
        usefullengineBlockId = engineId.getInt(202);
       
        cfg.save();
    }

    @Init
    public void Init(FMLInitializationEvent evt) {
    NetworkRegistry.instance().registerGuiHandler(instance, proxy);
View Full Code Here

 
  int MachineFrameID = Config.getBlock("MachineFrame", 3520).getInt();
 
 
 
  Config.save();
 
  MechaniCraftBlocks = new CreativeTabs("MechaniCraftBlocks"){ public ItemStack getIconItemStack(){ return new ItemStack(Block.obsidian);}};
  MechaniCraftCombat = new CreativeTabs("MechaniCraftCombat"){ public ItemStack getIconItemStack(){ return new ItemStack(MechaniCraft.ObsidianSword);}};
  MechaniCraftTools = new CreativeTabs("MechaniCraftTools"){ public ItemStack getIconItemStack(){ return new ItemStack(MechaniCraft.ObsidianPickaxe);}};
  MechaniCraftMachines = new CreativeTabs("MechaniCraftMachines"){ public ItemStack getIconItemStack(){ return new ItemStack(MechaniCraft.IronFurnaceBurning);}};
View Full Code Here

    allowWorldUnloading = config.get(GENERAL, "allowWorldUnloading", allowWorldUnloading, "Whether worlds should be allowed to unload.").getBoolean(allowWorldUnloading);
    profilingInterval = config.get(GENERAL, "profilingInterval", profilingInterval, "Interval, in minutes, to record profiling information to disk. 0 = never. Recommended >= 2.").getInt();
    profilingFileName = config.get(GENERAL, "profilingFileName", profilingFileName, "Location to store profiling information to, relative to the server folder. For example, why not store it in a computercraft computer's folder?").getString();
    profilingJson = config.get(GENERAL, "profilingJson", profilingJson, "Whether to write periodic profiling in JSON format").getBoolean(profilingJson);
    rateLimitChunkUpdates = config.get(GENERAL, "rateLimitChunkUpdates", rateLimitChunkUpdates, "Whether to prevent repeated chunk updates which can cause rendering issues and disconnections for slow clients/connections.").getBoolean(rateLimitChunkUpdates);
    config.save();
    int[] disabledDimensions = config.get(GENERAL, "disableFastMobSpawningDimensions", new int[]{-1, 1}, "List of dimensions not to enable fast spawning in.").getIntList();
    disabledFastMobSpawningDimensions = new HashSet<Integer>(disabledDimensions.length);
    for (int disabledDimension : disabledDimensions) {
      disabledFastMobSpawningDimensions.add(disabledDimension);
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.