Skip to content

Commit

Permalink
Potions Minor Code Reference Change (#140)
Browse files Browse the repository at this point in the history
* Potions Minor Code Change

* edit update
  • Loading branch information
JaaiDead authored Jul 14, 2024
1 parent b58808a commit 4234347
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 4234347

Please sign in to comment.