// Path: src/main/java/com/hea3ven/buildingbricks/core/materials/MaterialBlockRecipes.java
// public static class MaterialBlockRecipeBuilder extends RecipeBuilder<MaterialBlockRecipeBuilder> {
// 
// 	private Material mat;
// 	private MaterialBlockType type;
// 
// 	public MaterialBlockRecipeBuilder bind(Material mat) {
// 		this.mat = mat;
// 		return this;
// 	}
// 
// 	public MaterialBlockRecipeBuilder output(MaterialBlockType type) {
// 		this.type = type;
// 		return this;
// 	}
// 
// 	@Override
// 	public IRecipe build() {
// 		output(mat.getBlock(type).getStack());
// 		return super.build();
// 	}
// 
// 	@Override
// 	protected Object parseIngredient(String ingredient) {
// 		for (MaterialBlockType blockType : MaterialBlockType.values()) {
// 			if (blockType.toString().equals(ingredient)) {
// 				if (MaterialBlockRegistry.instance.enabledBlocks.get(blockType)) {
// 					return mat.getBlock(blockType).getStack();
// 				} else {
// 					throw new DisabledMaterialBlockRecipe();
// 				}
// 			}
// 		}
// 		return super.parseIngredient(ingredient);
// 	}
// 
// 	public class DisabledMaterialBlockRecipe extends RuntimeException {
// 	}
// }


import javax.annotation.Nonnull;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTBase;
import com.hea3ven.buildingbricks.core.materials.MaterialBlockRecipes.MaterialBlockRecipeBuilder;
	private BlockDescription(MaterialBlockType type, List<MaterialBlockRecipeBuilder> recipes) {
		this(type, (String) null, 0, new HashMap<>(), recipes);
	}

	public ItemBlock getItem() {
		return (ItemBlock) getStack().getItem();
	}

	public ItemStack getStack() {
		if (!stackInit) {
			stackInit = true;
			Item item = Item.getItemFromBlock(getBlock());
			if (item != null) {
				stack = new ItemStack(item, 1, meta);
				for (Entry<String, NBTBase> entry : tags.entrySet()) {
					stack.setTagInfo(entry.getKey(), entry.getValue());
				}
			}
		}
		return stack;
	}

	boolean isBlockTemplate() {
		return block == null && blockName == null;
	}

	void setBlock(Block block, int meta, Map<String, NBTBase> tags) {
		this.block = block;
		this.meta = meta;
		if (tags != null)
// Path: src/main/java/com/hea3ven/buildingbricks/core/materials/MaterialBlockRecipes.java
// public static class MaterialBlockRecipeBuilder extends RecipeBuilder<MaterialBlockRecipeBuilder> {
// 
// 	private Material mat;
// 	private MaterialBlockType type;
// 
// 	public MaterialBlockRecipeBuilder bind(Material mat) {
// 		this.mat = mat;
// 		return this;
// 	}
// 
// 	public MaterialBlockRecipeBuilder output(MaterialBlockType type) {
// 		this.type = type;
// 		return this;
// 	}
// 
// 	@Override
// 	public IRecipe build() {
// 		output(mat.getBlock(type).getStack());
// 		return super.build();
// 	}
// 
// 	@Override
// 	protected Object parseIngredient(String ingredient) {
// 		for (MaterialBlockType blockType : MaterialBlockType.values()) {
// 			if (blockType.toString().equals(ingredient)) {
// 				if (MaterialBlockRegistry.instance.enabledBlocks.get(blockType)) {
// 					return mat.getBlock(blockType).getStack();
// 				} else {
// 					throw new DisabledMaterialBlockRecipe();
// 				}
// 			}
// 		}
// 		return super.parseIngredient(ingredient);
// 	}
// 
// 	public class DisabledMaterialBlockRecipe extends RuntimeException {
// 	}
// }


// Path: src/main/java/com/hea3ven/buildingbricks/core/materials/BlockDescription.java
import javax.annotation.Nonnull;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTBase;
import com.hea3ven.buildingbricks.core.materials.MaterialBlockRecipes.MaterialBlockRecipeBuilder;

	private BlockDescription(MaterialBlockType type, List<MaterialBlockRecipeBuilder> recipes) {
		this(type, (String) null, 0, new HashMap<>(), recipes);
	}

	public ItemBlock getItem() {
		return (ItemBlock) getStack().getItem();
	}

	public ItemStack getStack() {
		if (!stackInit) {
			stackInit = true;
			Item item = Item.getItemFromBlock(getBlock());
			if (item != null) {
				stack = new ItemStack(item, 1, meta);
				for (Entry<String, NBTBase> entry : tags.entrySet()) {
					stack.setTagInfo(entry.getKey(), entry.getValue());
				}
			}
		}
		return stack;
	}

	boolean isBlockTemplate() {
		return block == null && blockName == null;
	}

	void setBlock(Block block, int meta, Map<String, NBTBase> tags) {
		this.block = block;
		this.meta = meta;
		if (tags != null)
			this.tags = tags;