dev.polymodloader.api.content.effect
This page is generated from the source's Javadoc by ./gradlew apiReference. Do not edit it; fix the source comment and generate it again.
| Type | Kind | Description |
|---|---|---|
EffectBehavior | functional interface | What a mod status effect does while active. |
EffectCategory | enum | Whether an effect helps, harms, or neither (affects icons, milk, and some mob reactions). |
EffectDefinition | record | A mod status effect. |
EffectHandle | interface | A declared status effect. |
EffectBehavior
functional interface · Stability PREVIEW · Since 0.1.0-alpha.4 or earlier
public interface EffectBehavior
What a mod status effect does while active.
onTick(LivingEntityView, int)
void onTick(LivingEntityView entity, int amplifier)
Since 0.1.0-alpha.4 or earlier
Called on the server every tickInterval ticks while the entity has the effect.
| Parameter | Type | Description |
|---|---|---|
entity | LivingEntityView | — |
amplifier | int | 0 for level I |
EffectCategory
enum · Stability PREVIEW · Since 0.1.0-alpha.4 or earlier
public enum EffectCategory
Whether an effect helps, harms, or neither (affects icons, milk, and some mob reactions).
| Constant | Description |
|---|---|
BENEFICIAL | — |
HARMFUL | — |
NEUTRAL | — |
EffectDefinition
record · Stability PREVIEW · Since 0.1.0-alpha.4 or earlier
public record EffectDefinition(EffectCategory category, int color, int tickInterval, EffectBehavior behavior)
A mod status effect. Its name comes from effect.<mod id>.<path> and its icon from textures/mob_effect/<path>.png in the mod's resource pack.
| Component | Type | Description |
|---|---|---|
category | EffectCategory | helpful, harmful, or neutral |
color | int | particle colour as 0xRRGGBB |
tickInterval | int | ticks between EffectBehavior.onTick calls, at least 1 |
behavior | EffectBehavior | what the effect does |
EffectHandle
interface · Stability PREVIEW · Since 0.1.0-alpha.4 or earlier
public interface EffectHandle extends ContentHandle
A declared status effect.
Supertypes: ContentHandle