tutorial:status_effects
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| tutorial:status_effects [2021/07/25 15:08] – typo fireblast | tutorial:status_effects [2023/01/12 07:06] (current) – [Registering Status Effect] fix code errors tao0lu | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| To add status effects to your mod, you'll need to: | To add status effects to your mod, you'll need to: | ||
| * 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 14: | Line 14: | ||
| public ExpStatusEffect() { | public ExpStatusEffect() { | ||
| super( | super( | ||
| - | | + | |
| 0x98D982); // color in RGB | 0x98D982); // color in RGB | ||
| } | } | ||
| Line 44: | Line 44: | ||
| @Override | @Override | ||
| public void onInitialize() { | public void onInitialize() { | ||
| - | Registry.register(Registry.STATUS_EFFECT, | + | Registry.register(Registries.STATUS_EFFECT, |
| } | } | ||
| } | } | ||
tutorial/status_effects.1627225722.txt.gz · Last modified: 2021/07/25 15:08 by fireblast