Search in sources :

Example 1 with ThreshingRecipe

use of betterwithaddons.crafting.recipes.ThreshingRecipe in project BetterWithAddons by DaedalusGame.

the class InteractionWheat method modifyRecipes.

@Override
void modifyRecipes(RegistryEvent.Register<IRecipe> event) {
    ForgeRegistry<IRecipe> reg = (ForgeRegistry<IRecipe>) event.getRegistry();
    if (THRESH_WHEAT) {
        event.getRegistry().register(new ThreshingRecipe(new ResourceLocation(Reference.MOD_ID, "thresh_wheat"), new ItemStack(Items.WHEAT_SEEDS), new OreIngredient("cropWheat")).setRegistryName(new ResourceLocation(Reference.MOD_ID, "thresh_wheat")));
    }
    if (CHANGE_HAY_BALES) {
        removeRecipeByOutput(reg, new ItemStack(Blocks.HAY_BLOCK), "minecraft");
        removeRecipeByOutput(reg, new ItemStack(Items.WHEAT, 9), "minecraft");
        if (Loader.isModLoaded("quark")) {
            Block thatch = Block.getBlockFromName("quark:thatch");
            if (thatch != null) {
                removeRecipeByOutput(reg, new ItemStack(thatch), "quark");
                removeRecipeByOutput(reg, new ItemStack(Items.WHEAT, 4), "quark");
            }
        }
    }
}
Also used : ForgeRegistry(net.minecraftforge.registries.ForgeRegistry) IRecipe(net.minecraft.item.crafting.IRecipe) ResourceLocation(net.minecraft.util.ResourceLocation) Block(net.minecraft.block.Block) OreIngredient(net.minecraftforge.oredict.OreIngredient) ItemStack(net.minecraft.item.ItemStack) ThreshingRecipe(betterwithaddons.crafting.recipes.ThreshingRecipe)

Aggregations

ThreshingRecipe (betterwithaddons.crafting.recipes.ThreshingRecipe)1 Block (net.minecraft.block.Block)1 ItemStack (net.minecraft.item.ItemStack)1 IRecipe (net.minecraft.item.crafting.IRecipe)1 ResourceLocation (net.minecraft.util.ResourceLocation)1 OreIngredient (net.minecraftforge.oredict.OreIngredient)1 ForgeRegistry (net.minecraftforge.registries.ForgeRegistry)1