<commit_before>package pixlepix.minechem.common.recipe;

import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
import pixlepix.minechem.api.core.Chemical;
import pixlepix.minechem.api.recipe.DecomposerRecipe;

import java.util.ArrayList;

public class DecomposerFluidRecipe extends DecomposerRecipe {

	public FluidStack inputFluid;

	public DecomposerFluidRecipe(FluidStack fluid, Chemical... chemicals) {
		super(chemicals);
		this.inputFluid = fluid;
	}

	public DecomposerFluidRecipe(String fluid, int amount, Chemical[] chemicals) {

		this(new FluidStack(FluidRegistry.getFluid(fluid), amount), chemicals);
	}

	public static void createAndAddFluidRecipeSafely(String fluid, int amount, Chemical... chemicals) {
		if (FluidRegistry.isFluidRegistered(fluid)) {
			DecomposerRecipe.add(new DecomposerFluidRecipe(fluid, amount, chemicals));
		}
	}

	public ItemStack getInput() {
		return new ItemStack(this.inputFluid.getFluid().getBlockID(), 1, 0);
	}

	public ArrayList<Chemical> getOutput() {
		return this.output;
	}

	public ArrayList<Chemical> getOutputRaw() {
		return this.output;
	}

}<commit_msg>Fixed crash with badly registered fluids.<commit_after>package pixlepix.minechem.common.recipe;

import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
import pixlepix.minechem.api.core.Chemical;
import pixlepix.minechem.api.recipe.DecomposerRecipe;

import java.util.ArrayList;

public class DecomposerFluidRecipe extends DecomposerRecipe {

	public FluidStack inputFluid;

	public DecomposerFluidRecipe(FluidStack fluid, Chemical... chemicals) {
		super(chemicals);
		this.inputFluid = fluid;
	}

	public DecomposerFluidRecipe(String fluid, int amount, Chemical[] chemicals) {

		this(new FluidStack(FluidRegistry.getFluid(fluid), amount), chemicals);
	}

	public static void createAndAddFluidRecipeSafely(String fluid, int amount, Chemical... chemicals) {
		if (FluidRegistry.isFluidRegistered(fluid)) {
			DecomposerRecipe.add(new DecomposerFluidRecipe(fluid, amount, chemicals));
		}
	}

	public ItemStack getInput() {
		return new ItemStack(this.inputFluid.getFluid() != null ? this.inputFluid.getFluid().getBlockID() : null, 1, 0);
	}

	public ArrayList<Chemical> getOutput() {
		return this.output;
	}

	public ArrayList<Chemical> getOutputRaw() {
		return this.output;
	}

}
{'fraction_non_alphanumeric': 0.10433715220949263, 'fraction_numerical': 0.0016366612111292963, 'mean_word_length': 5.848739495798319, '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': '3111379', 'n_tokens_mistral': 857, 'n_tokens_neox': 792, 'n_words': 156}