Posted May 2, 20214 yr I have a brewing recipe with the following code but the issue is that it's accepting anything as an ingredient package mod.trianglesinpoo.mcores; import javax.annotation.Nonnull; import net.minecraft.item.ItemStack; import net.minecraft.potion.PotionUtils; import net.minecraft.potion.Potions; import net.minecraftforge.common.brewing.IBrewingRecipe; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; public class brewrecipe implements IBrewingRecipe{ private static final Logger LOGGER = LogManager.getLogger(); private static final ItemStack INGREDIENT = new ItemStack(ItemHolder.CRYOEXTRACT.get()); private static final ItemStack OUTPUT = new ItemStack(ItemHolder.CRYOCOCKTAIL.get()); @Override public boolean isInput(@Nonnull ItemStack stack) { return PotionUtils.getPotion(stack) == Potions.WATER; } @Override public boolean isIngredient(@Nonnull ItemStack ingredient) { return INGREDIENT.getItem() == ItemHolder.CRYOEXTRACT.get(); } @Nonnull @Override public ItemStack getOutput(@Nonnull ItemStack input,@Nonnull ItemStack ingredient) { if (isInput(input) && isIngredient(ingredient)) { return new ItemStack(ItemHolder.CRYOCOCKTAIL.get()); } return ItemStack.EMPTY; } }
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.