Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Hello, how to I register a brewing for an existing potion?

 

To give some context I just want to create recipes for this mod https://www.curseforge.com/minecraft/mc-mods/potion-core

 

Im a developer but quite illiterate on java env. I understand that I have to reference potion-core's jar in my code in order to tie the recipes and potions.

 

I was looking on the internet about doing so but I can't stull find exactly what im looking for..

 

For instance Charm mod coffee potion ctor:

 

    public CoffeePotion()
    {
        super("coffee", false, 0x160202, 3);

        List<PotionEffect> effects = new ArrayList<>();
        effects.add(new PotionEffect(MobEffects.SPEED, Coffee.duration * 20));
        effects.add(new PotionEffect(MobEffects.HASTE, Coffee.duration * 20));
        effects.add(new PotionEffect(MobEffects.STRENGTH, Coffee.duration * 20));
        PotionEffect[] potionEffects = effects.toArray(new PotionEffect[0]);

        type = new PotionType(name, potionEffects).setRegistryName(new ResourceLocation(getModId(), name));
        ProxyRegistry.register(type);

        ItemStack cocoa = new ItemStack(Items.DYE, 1, 3);
        PotionHelper.addMix(PotionTypes.WATER, Ingredient.fromStacks(cocoa), type);
    }

 

I see that here the author is creating a PotionType rather than using an already existing Potion.

 

What PotionCore provides is a bunch of Potions > package net.minecraft.potion.Potion

 

However PotionHelper.addMix only seems to work with PotionType 😕

 

Im a bit lost over here xd

 

Any help appreciated :)

 

You need to update to at least the LTS of 1.15.2 to receive support on the forum. You can view the currently supported versions in the blue bar at the top of this forum.

  • Author

Thanks for the reply. Where I can receive support for 1.12.2 version?

  • Guest locked this topic
Guest
This topic is now closed to further replies.

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.