tutorial:status_effects
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
tutorial:status_effects [2020/08/30 08:21] – Create a tutorial on how to add status effects siglong | tutorial:status_effects [2021/09/13 08:24] – removed inline method as it doesn't seem to work banana | ||
---|---|---|---|
Line 1: | Line 1: | ||
===== Adding Status Effects ===== | ===== Adding Status Effects ===== | ||
- | To add enchantments | + | To add status effects |
* create a class that extends '' | * create a class that extends '' | ||
- | * register your status effect | ||
* add custom functionality | * add custom functionality | ||
+ | * register your status effect | ||
* add translations and textures for your status effect | * add translations and textures for your status effect | ||
==== Creating Status Effect Class ==== | ==== Creating Status Effect Class ==== | ||
- | We will add new status effect that gives you EXP every tick. | + | We will add a new status effect that gives you EXP every tick. |
<code java> | <code java> | ||
Line 18: | Line 18: | ||
} | } | ||
- | // This method is called every tick to check weather | + | // This method is called every tick to check whether |
@Override | @Override | ||
public boolean canApplyUpdateEffect(int duration, int amplifier) { | public boolean canApplyUpdateEffect(int duration, int amplifier) { |
tutorial/status_effects.txt · Last modified: 2023/01/12 07:06 by tao0lu