Skip to content

Commit 2485251

Browse files
add link to mobeffects article in index.md
1 parent a3a5d49 commit 2485251

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/items/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ The `Item` class provides default functionality for food items, meaning you don'
4141
- `meat` - Whether this item should be considered meat or not. Used e.g. for determining if healing dogs with this food is possible.
4242
- `alwaysEat` - Whether this item can always be eaten, even if the hunger bar is full. `false` by default, `true` for golden apples and other items that provide bonuses beyond just filling the hunger bar.
4343
- `fast` - Whether fast eating should be enabled for this food. `false` by default, `true` for dried kelp in vanilla.
44-
- `effect` - Adds a `MobEffectInstance` to apply when eating this item. The second parameter denotes the probability of the effect being applied; for example, Rotten Flesh has an 80% chance of applying the Hunger effect when eaten. This method comes in two variants; you should use the one that takes in a supplier (the other one directly takes a mob effect instance and is deprecated by NeoForge due to classloading issues).
44+
- `effect` - Adds a [`MobEffectInstance`][mobeffectinstance] to apply when eating this item. The second parameter denotes the probability of the effect being applied; for example, Rotten Flesh has an 80% chance (= 0.8) of applying the Hunger effect when eaten. This method comes in two variants; you should use the one that takes in a supplier (the other one directly takes a mob effect instance and is deprecated by NeoForge due to classloading issues).
4545
- `build` - Once you've set everything you want to set, call `build` to get a `FoodProperties` object for further use.
4646

4747
For examples, or to look at the various values used by Minecraft, have a look at the `Foods` class.
@@ -145,6 +145,7 @@ public static final Supplier<CreativeModeTab> EXAMPLE_TAB = CREATIVE_MODE_TABS.r
145145
[hunger]: https://minecraft.wiki/w/Hunger#Mechanics
146146
[interactionpipeline]: interactionpipeline.md
147147
[loottables]: ../resources/server/loottables.md
148+
[mobeffectinstance]: mobeffects.md#mobeffectinstances
148149
[modbus]: ../concepts/events.md#mod-event-bus
149150
[nbt]: ../datastorage/nbt.md
150151
[registering]: ../concepts/registries.md#methods-for-registering

0 commit comments

Comments
 (0)