<commit_before>package com.scottkillen.mod.dendrology.compat.minechem;

import com.scottkillen.mod.dendrology.content.OverworldTreeSpecies;
import com.scottkillen.mod.dendrology.util.log.Logger;
import cpw.mods.fml.common.Loader;
import minechem.api.RecipeAPI;
import net.minecraft.item.ItemStack;

public enum MinechemMod
{
    ;

    public static void integrate()
    {
        if (Loader.isModLoaded("minechem"))
        {
            addDecomposerRecipes();
        } else Logger.info("Minechem mod not present. Integration skipped.");
    }

    private static void addDecomposerRecipes()
    {
        Logger.info("Adding Minechem decomposer recipes.");
        for (final OverworldTreeSpecies tree : OverworldTreeSpecies.values())
        {
            //noinspection ObjectAllocationInLoop
            final ItemStack planks = new ItemStack(tree.getPlanksBlock(), 1, tree.getPlanksMeta());
            if (RecipeAPI.addDecompositionRecipe(planks, "2 cellulose"))
                Logger.info("Added Minechem decomposer recipe for %s planks.", tree.getName());

            //noinspection ObjectAllocationInLoop
            final ItemStack slab = new ItemStack(tree.getSingleSlabBlock(), 1, tree.getSlabMeta());
            if (RecipeAPI.addDecompositionRecipe(slab, "2 cellulose"))
                Logger.info("Added Minechem decomposer recipe for %s slab.", tree.getName());

            //noinspection ObjectAllocationInLoop
            final ItemStack sapling = new ItemStack(tree.getSaplingBlock(), 1, tree.getSaplingMeta());<commit_msg>Remove runtime dependency on embedded API<commit_after>package com.scottkillen.mod.dendrology.compat.minechem;

import com.scottkillen.mod.dendrology.content.OverworldTreeSpecies;
import com.scottkillen.mod.dendrology.util.log.Logger;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.Optional.Method;
import minechem.api.RecipeAPI;
import net.minecraft.item.ItemStack;

public enum MinechemMod
{
    ;
    private static final String MINECHEM = "minechem";

    public static void integrate()
    {
        if (Loader.isModLoaded(MINECHEM))
        {
            addDecomposerRecipes();
        } else Logger.info("Minechem mod not present. Integration skipped.");
    }

    @Method(modid = MINECHEM)
    private static void addDecomposerRecipes()
    {
        Logger.info("Adding Minechem decomposer recipes.");
        for (final OverworldTreeSpecies tree : OverworldTreeSpecies.values())
        {
            //noinspection ObjectAllocationInLoop
            final ItemStack planks = new ItemStack(tree.getPlanksBlock(), 1, tree.getPlanksMeta());
            if (RecipeAPI.addDecompositionRecipe(planks, "2 cellulose"))
                Logger.info("Added Minechem decomposer recipe for %s planks.", tree.getName());

            //noinspection ObjectAllocationInLoop
            final ItemStack slab = new ItemStack(tree.getSingleSlabBlock(), 1, tree.getSlabMeta());
            if (RecipeAPI.addDecompositionRecipe(slab, "2 cellulose"))
                Logger.info("Added Minechem decomposer recipe for %s slab.", tree.getName());

            //noinspection ObjectAllocationInLoop
            final ItemStack sapling = new ItemStack(tree.getSaplingBlock(), 1, tree.getSaplingMeta());
{'fraction_non_alphanumeric': 0.10144482016600062, 'fraction_numerical': 0.003074085459575776, 'mean_word_length': 3.1771501925545573, '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': '4630013', 'n_tokens_mistral': 966, 'n_tokens_neox': 914, 'n_words': 200}