Posted October 31, 20214 yr Ok, now that I've gotten my brewing recipe to work I'm trying to actually create a new potion type. I've looked at some other forum threads. This looks like it should be correct but I can no longer brew the item. I can't find the new potion type in the menu so something is wrong: @Mod.EventBusSubscriber(bus = Bus.MOD, modid = "wof") public class ModPotions { public static final DeferredRegister<Potion> POTION_TYPES = DeferredRegister.create(ForgeRegistries.POTION_TYPES, WorldOfFood.MOD_ID); public static final RegistryObject<Potion> HOT_COCOA = POTION_TYPES.register("hot_cocoa", () -> new Potion(new EffectInstance(Effects.SATURATION, 3600))); @SubscribeEvent public static void registerPotions(FMLCommonSetupEvent event) { event.enqueueWork( ()-> BrewingRecipeRegistry.addRecipe(Ingredient.of(Items.POTION), Ingredient.of(Items.COCOA_BEANS), PotionUtils.setPotion(new ItemStack(Items.POTION), HOT_COCOA.get())) ); } }
November 1, 20214 yr Author That fixed it, thanks! I'll work on changing my ModId. 🙂 I put this in my mod class constructor: ModPotions.POTION_TYPES.register(FMLJavaModLoadingContext.get().getModEventBus());
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.