<commit_before>package com.hea3ven.tools.commonutils.item.crafting;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;

import net.minecraftforge.oredict.OreDictionary;
import net.minecraftforge.oredict.ShapedOreRecipe;
import net.minecraftforge.oredict.ShapelessOreRecipe;

public class RecipeBuilder<T extends RecipeBuilder> {
	private static final Pattern itemPattern = Pattern.compile("((\\d+)x)?(\\w*:\\w*)(@(\\d+))?");

	private boolean shaped = true;
	private ItemStack output;
	private String outputIngredient;
	private int outputSize = 1;
	private String[] ingredients;

	public IRecipe build() {
		if (ingredients == null)
			throw new IllegalStateException("No ingredients were defined");

		ItemStack result = (outputIngredient != null) ? parseStack(outputIngredient) : output.copy();
		if (result.stackSize == 1)
			result.stackSize = outputSize;
		if (shaped) {<commit_msg>* Fix the error message in RecipeBuilder when no output is defined<commit_after>package com.hea3ven.tools.commonutils.item.crafting;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;

import net.minecraftforge.oredict.OreDictionary;
import net.minecraftforge.oredict.ShapedOreRecipe;
import net.minecraftforge.oredict.ShapelessOreRecipe;

public class RecipeBuilder<T extends RecipeBuilder> {
	private static final Pattern itemPattern = Pattern.compile("((\\d+)x)?(\\w*:\\w*)(@(\\d+))?");

	private boolean shaped = true;
	private ItemStack output;
	private String outputIngredient;
	private int outputSize = 1;
	private String[] ingredients;

	public IRecipe build() {
		if (ingredients == null)
			throw new IllegalStateException("No ingredients were defined");

		if (outputIngredient == null && output == null) {
			StringBuilder inputs = new StringBuilder();
			for (String ingredient : ingredients) {
				if (inputs.length() != 0)
					inputs.append(", ");
				inputs.append(ingredient);
			}
			throw new IllegalStateException("No output defined for recipe with inputs " + inputs.toString());
		}
		ItemStack result = (outputIngredient != null) ? parseStack(outputIngredient) : output.copy();
		if (result.stackSize == 1)
			result.stackSize = outputSize;
		if (shaped) {
{'fraction_non_alphanumeric': 0.1209077380952381, 'fraction_numerical': 0.0026041666666666665, 'mean_word_length': 5.195852534562212, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '7592492', 'n_tokens_mistral': 875, 'n_tokens_neox': 833, 'n_words': 201}