<commit_before>package crazypants.enderio.integration.forestry;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;

import com.enderio.core.common.Lang;

import crazypants.enderio.api.addon.IEnderIOAddon;
import crazypants.enderio.base.Log;
import crazypants.enderio.integration.forestry.config.ConfigHandler;
import net.minecraft.block.Block;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
import net.minecraftforge.fml.common.Mod.EventHandler;
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.common.eventhandler.SubscribeEvent;

@Mod(modid = EnderIOIntegrationForestry.MODID, name = EnderIOIntegrationForestry.MOD_NAME, version = EnderIOIntegrationForestry.VERSION, dependencies = EnderIOIntegrationForestry.DEPENDENCIES)
@EventBusSubscriber
public class EnderIOIntegrationForestry implements IEnderIOAddon {

  public static final @Nonnull String MODID = "enderiointegrationforestry";
  public static final @Nonnull String DOMAIN = "enderio";
  public static final @Nonnull String MOD_NAME = "Ender IO Integration with Forestry";
  public static final @Nonnull String VERSION = "@VERSION@";

  private static final @Nonnull String DEFAULT_DEPENDENCIES = "after:" + crazypants.enderio.base.EnderIO.MODID;
  public static final @Nonnull String DEPENDENCIES = DEFAULT_DEPENDENCIES;

  @EventHandler
  public static void init(@Nonnull FMLPreInitializationEvent event) {
    if (isLoaded()) {
      ConfigHandler.init(event);
      ForestryControl.init(event);
      Log.warn("Forestry integration loaded. Let things grow.");
    } else {
      Log.warn("Forestry integration NOT loaded. Forestry is not installed");
    }
  }

  @EventHandler
  public static void init(FMLInitializationEvent event) {
    if (isLoaded()) {
      ForestryControl.init(event);
    }
  }<commit_msg>Init Forestry config even if Forestry is not installed so the following code doesn't have to worry about details<commit_after>package crazypants.enderio.integration.forestry;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;

import com.enderio.core.common.Lang;

import crazypants.enderio.api.addon.IEnderIOAddon;
import crazypants.enderio.base.Log;
import crazypants.enderio.integration.forestry.config.ConfigHandler;
import net.minecraft.block.Block;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
import net.minecraftforge.fml.common.Mod.EventHandler;
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.common.eventhandler.SubscribeEvent;

@Mod(modid = EnderIOIntegrationForestry.MODID, name = EnderIOIntegrationForestry.MOD_NAME, version = EnderIOIntegrationForestry.VERSION, dependencies = EnderIOIntegrationForestry.DEPENDENCIES)
@EventBusSubscriber
public class EnderIOIntegrationForestry implements IEnderIOAddon {

  public static final @Nonnull String MODID = "enderiointegrationforestry";
  public static final @Nonnull String DOMAIN = "enderio";
  public static final @Nonnull String MOD_NAME = "Ender IO Integration with Forestry";
  public static final @Nonnull String VERSION = "@VERSION@";

  private static final @Nonnull String DEFAULT_DEPENDENCIES = "after:" + crazypants.enderio.base.EnderIO.MODID;
  public static final @Nonnull String DEPENDENCIES = DEFAULT_DEPENDENCIES;

  @EventHandler
  public static void init(@Nonnull FMLPreInitializationEvent event) {
    ConfigHandler.init(event);
    if (isLoaded()) {
      ForestryControl.init(event);
      Log.warn("Forestry integration loaded. Let things grow.");
    } else {
      Log.warn("Forestry integration NOT loaded. Forestry is not installed");
    }
  }

  @EventHandler
  public static void init(FMLInitializationEvent event) {
    if (isLoaded()) {
      ForestryControl.init(event);
    }
  }
{'fraction_non_alphanumeric': 0.08786049631120053, 'fraction_numerical': 0.0, 'mean_word_length': 5.768532526475038, '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': '4236327', 'n_tokens_mistral': 1365, 'n_tokens_neox': 1358, 'n_words': 282}