Skip to content

Commit

Permalink
Merge branch 'main' into customEnchantments
Browse files Browse the repository at this point in the history
  • Loading branch information
krizh-p authored Jul 17, 2024
2 parents 069653c + 4234347 commit ac72015
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions develop/items/potions.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ authors:
- dicedpixels
- PandoricaVi
- Drakonkinst
- JaaiDead

---

# Potions {#potions}
Expand All @@ -21,7 +23,7 @@ Just like items and blocks, potions need to be registered.
Let's start by declaring a field to store your `Potion` instance. We will be directly using the initializer class to
hold this.

@[code lang=java transclude={21-29}](@/reference/latest/src/main/java/com/example/docs/potion/FabricDocsReferencePotions.java)
@[code lang=java transclude={19-27}](@/reference/latest/src/main/java/com/example/docs/potion/FabricDocsReferencePotions.java)

We pass an instance of `StatusEffectInstance`, which takes 3 parameters:

Expand All @@ -38,7 +40,7 @@ To create your own potion effect, please see the [Effects](../entities/effects)

In our initializer, we will use the `FabricBrewingRecipeRegistryBuilder.BUILD` event to register our potion using the `BrewingRecipeRegistry.registerPotionRecipe` method.

@[code lang=java transclude={33-42}](@/reference/latest/src/main/java/com/example/docs/potion/FabricDocsReferencePotions.java)
@[code lang=java transclude={29-42}](@/reference/latest/src/main/java/com/example/docs/potion/FabricDocsReferencePotions.java)

`registerPotionRecipe` takes 3 parameters:

Expand Down

0 comments on commit ac72015

Please sign in to comment.