<commit_before>package xyz.brassgoggledcoders.boilerplate.lib;

import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.fml.common.FMLCommonHandler;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.relauncher.Side;
import xyz.brassgoggledcoders.boilerplate.lib.client.events.ClientEventsHandler;
import xyz.brassgoggledcoders.boilerplate.lib.client.guis.GuiHandler;
import xyz.brassgoggledcoders.boilerplate.lib.common.CommonProxy;
import xyz.brassgoggledcoders.boilerplate.lib.common.IBoilerplateMod;
import xyz.brassgoggledcoders.boilerplate.lib.common.modcompat.CompatibilityHandler;
import xyz.brassgoggledcoders.boilerplate.lib.common.network.PacketHandler;
import xyz.brassgoggledcoders.boilerplate.lib.common.utils.ModLogger;
import xyz.brassgoggledcoders.boilerplate.lib.common.utils.Utils;

public class BoilerplateLib
{
	public static String VERSION = "@VERSION@";
	private static BoilerplateLib instance = null;

	public boolean colorblind;
	public ModLogger logger;
	public IBoilerplateMod mod;
	public GuiHandler guiHandler;
	public PacketHandler packetHandler;
	public CompatibilityHandler compatibilityHandler;
	public CommonProxy proxy;

	public static BoilerplateLib getInstance()
	{
		if(instance == null)
		{
			IBoilerplateMod modInstance = Utils.getCurrentMod();
			if(modInstance != null)
			{
				instance = new BoilerplateLib(modInstance);
			}
		}
		return instance;
	}

	protected BoilerplateLib()
	{

	}

	protected BoilerplateLib(IBoilerplateMod mod)
	{
		this.mod = mod;
		this.logger = mod.getLogger();
		this.guiHandler = new GuiHandler(mod);
		this.compatibilityHandler = new CompatibilityHandler(logger);
		this.packetHandler = new PacketHandler(mod.getID());
	}

	public Configuration config(FMLPreInitializationEvent event)
	{
		Configuration config = new Configuration(event.getSuggestedConfigurationFile());
		config.load();
		colorblind = config.get("general", "colorblindSupport", false, "True to enable").getBoolean();
		compatibilityHandler.configureModCompat(config);
		config.save();
		return config;
	}

	public void preInit(FMLPreInitializationEvent event)
	{
		String packageString = this.getClass().getPackage().toString().replace("package", "").trim();
		proxy = Utils.createProxy(packageString + ".client.ClientProxy", packageString + ".common.CommonProxy");
		compatibilityHandler.preInit(event);
	}

	public void init(FMLInitializationEvent event)
	{
		if (colorblind && FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT)
		{
			MinecraftForge.EVENT_BUS.register(new ClientEventsHandler());
		}
		proxy.initCompatibilityHandler(compatibilityHandler, event);
	}

	public void postInit(FMLPostInitializationEvent event)
	{
		compatibilityHandler.postInit(event);
	}
}
<commit_msg>Added version logging to Boilerplate lib<commit_after>package xyz.brassgoggledcoders.boilerplate.lib;

import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.fml.common.FMLCommonHandler;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.relauncher.Side;
import xyz.brassgoggledcoders.boilerplate.lib.client.events.ClientEventsHandler;
import xyz.brassgoggledcoders.boilerplate.lib.client.guis.GuiHandler;
import xyz.brassgoggledcoders.boilerplate.lib.common.CommonProxy;
import xyz.brassgoggledcoders.boilerplate.lib.common.IBoilerplateMod;
import xyz.brassgoggledcoders.boilerplate.lib.common.modcompat.CompatibilityHandler;
import xyz.brassgoggledcoders.boilerplate.lib.common.network.PacketHandler;
import xyz.brassgoggledcoders.boilerplate.lib.common.utils.ModLogger;
import xyz.brassgoggledcoders.boilerplate.lib.common.utils.Utils;

public class BoilerplateLib
{
	public static String VERSION = "@VERSION@";
	private static BoilerplateLib instance = null;

	public boolean colorblind;
	public ModLogger logger;
	public IBoilerplateMod mod;
	public GuiHandler guiHandler;
	public PacketHandler packetHandler;
	public CompatibilityHandler compatibilityHandler;
	public CommonProxy proxy;

	public static BoilerplateLib getInstance()
	{
		if(instance == null)
		{
			IBoilerplateMod modInstance = Utils.getCurrentMod();
			if(modInstance != null)
			{
				instance = new BoilerplateLib(modInstance);
			}
		}
		return instance;
	}

	protected BoilerplateLib()
	{

	}

	protected BoilerplateLib(IBoilerplateMod mod)
	{
		this.mod = mod;
		this.logger = mod.getLogger();
		this.guiHandler = new GuiHandler(mod);
		this.compatibilityHandler = new CompatibilityHandler(logger);
		this.packetHandler = new PacketHandler(mod.getID());
	}

	public Configuration config(FMLPreInitializationEvent event)
	{
		Configuration config = new Configuration(event.getSuggestedConfigurationFile());
		config.load();
		colorblind = config.get("general", "colorblindSupport", false, "True to enable").getBoolean();
		compatibilityHandler.configureModCompat(config);
		config.save();
		return config;
	}

	public void preInit(FMLPreInitializationEvent event)
	{
		logger.info(mod.getName() + " has BoilerplateLib Version " + VERSION + " installed");
		String packageString = this.getClass().getPackage().toString().replace("package", "").trim();
		String clientProxy = packageString + ".client.ClientProxy";
		String serverProxy = packageString + ".common.CommonProxy";

		proxy = Utils.createProxy(clientProxy, serverProxy);
		compatibilityHandler.preInit(event);
	}

	public void init(FMLInitializationEvent event)
	{
		if (colorblind && FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT)
		{
			MinecraftForge.EVENT_BUS.register(new ClientEventsHandler());
		}
		proxy.initCompatibilityHandler(compatibilityHandler, event);
	}

	public void postInit(FMLPostInitializationEvent event)
	{
		compatibilityHandler.postInit(event);
	}
}

{'fraction_non_alphanumeric': 0.10038734667527437, 'fraction_numerical': 0.0, 'mean_word_length': 6.264947245017585, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7489330', 'n_tokens_mistral': 2084, 'n_tokens_neox': 1924, 'n_words': 319}