Download PotionRecipeLib — Minecraft Mods — MetaMods

PotionRecipeLib

Archived

Downloads

0

Last update

3 years ago

Versions

1.17 — 1.19
Server
Fabric
Quilt
Libraries
Utils

PotionRecipeLib

Note: This library is archived since newer versions of FAPI already include similar functionality.

This simple library provides an easy way to create potion brewing recipes. If this is exactly what you need - great, use it. If you require additional functionality, you might want to look at nbt-crafting API or other similar solutions.

Essentially, it's just a "fancy" function call, nothing more, so you can create a similar implementation yourself if desired.

Setup

Add this library to your build.gradle as a dependency:

repositories {
    maven {
        name = "Modrinth"
        url = "https://api.modrinth.com/maven"
        content {
            includeGroup "maven.modrinth"
        }
    }
}

dependencies {
    modImplementation "maven.modrinth:potionrecipes:<version>"
}

If you need to include the API in your jar file, add the include line:

repositories {
    maven {
        name = "Modrinth"
        url = "https://api.modrinth.com/maven"
        content {
            includeGroup "maven.modrinth"
        }
    }
}

dependencies {
    modImplementation "maven.modrinth:potionrecipes:<version>"
    include "maven.modrinth:potionrecipes:<version>"
}

How to use

Simply call the function:

BrewingRecipeRegister.registerPotionRecipe(Potion input, Item item, Potion output);

Parameter input - the potion you start with, usually Potions.AWKWARD or your custom potion (will appear as YourPotions.POTION)

Parameter item - the ingredient needed for creating your potion

Parameter output - the potion you want to get as a crafting result

You can find a usage example in the mod.

Project members
Emafire003

Emafire003

Developer

Created: 6 Jun 2022

ID: 17625