<commit_before>package tonius.emobile.config;

import java.util.ArrayList;
import java.util.List;

import net.minecraftforge.common.config.Configuration;
import tonius.emobile.EMobile;
import cpw.mods.fml.client.event.ConfigChangedEvent.OnConfigChangedEvent;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;

public class EMConfig {

    public static Configuration config;
    public static List<ConfigSection> configSections = new ArrayList<ConfigSection>();

    public static final ConfigSection sectionGeneral = new ConfigSection("General Settings", "general");
    public static final ConfigSection sectionTweaks = new ConfigSection("Tweaks Settings", "tweaks");

    // general default
    public static final boolean allowTeleportPlayers_default = true;
    public static final boolean allowTeleportHome_default = true;
    public static final boolean allowTeleportSpawn_default = true;
    public static final int[] dimensionsBlacklist_default = new int[] { 1 };
    public static final boolean dimensionsWhitelist_default = false;

    // tweaks default
    public static final int enderPearlStackSize_default = 16;

    // item
    public static boolean allowTeleportPlayers = allowTeleportHome_default;
    public static boolean allowTeleportHome = allowTeleportHome_default;
    public static boolean allowTeleportSpawn = allowTeleportHome_default;
    public static int[] dimensionsBlacklist = dimensionsBlacklist_default;
    public static boolean dimensionsWhitelist = dimensionsWhitelist_default;

    // tweaks
    public static int enderPearlStackSize = enderPearlStackSize_default;

    public static void preInit(FMLPreInitializationEvent evt) {
        FMLCommonHandler.instance().bus().register(new EMConfig());
        config = new Configuration(evt.getSuggestedConfigurationFile());
        EMobile.log.info("Loading configuration file");
        syncConfig();
    }

    public static void syncConfig() {
        try {
            processConfig();
        } catch (Exception e) {
            e.printStackTrace();<commit_msg>All dimensions are allowed by default<commit_after>package tonius.emobile.config;

import java.util.ArrayList;
import java.util.List;

import net.minecraftforge.common.config.Configuration;
import tonius.emobile.EMobile;
import cpw.mods.fml.client.event.ConfigChangedEvent.OnConfigChangedEvent;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;

public class EMConfig {

    public static Configuration config;
    public static List<ConfigSection> configSections = new ArrayList<ConfigSection>();

    public static final ConfigSection sectionGeneral = new ConfigSection("General Settings", "general");
    public static final ConfigSection sectionTweaks = new ConfigSection("Tweaks Settings", "tweaks");

    // general default
    public static final boolean allowTeleportPlayers_default = true;
    public static final boolean allowTeleportHome_default = true;
    public static final boolean allowTeleportSpawn_default = true;
    public static final int[] dimensionsBlacklist_default = new int[0];
    public static final boolean dimensionsWhitelist_default = false;

    // tweaks default
    public static final int enderPearlStackSize_default = 16;

    // item
    public static boolean allowTeleportPlayers = allowTeleportHome_default;
    public static boolean allowTeleportHome = allowTeleportHome_default;
    public static boolean allowTeleportSpawn = allowTeleportHome_default;
    public static int[] dimensionsBlacklist = dimensionsBlacklist_default;
    public static boolean dimensionsWhitelist = dimensionsWhitelist_default;

    // tweaks
    public static int enderPearlStackSize = enderPearlStackSize_default;

    public static void preInit(FMLPreInitializationEvent evt) {
        FMLCommonHandler.instance().bus().register(new EMConfig());
        config = new Configuration(evt.getSuggestedConfigurationFile());
        EMobile.log.info("Loading configuration file");
        syncConfig();
    }

    public static void syncConfig() {
        try {
            processConfig();
        } catch (Exception e) {
            e.printStackTrace();
{'fraction_non_alphanumeric': 0.07322127561593368, 'fraction_numerical': 0.001381533502187428, 'mean_word_length': 4.450439146800502, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1685336', 'n_tokens_mistral': 1136, 'n_tokens_neox': 1102, 'n_words': 297}