Skip to main content
Version: Minecraft 26.2

dev.polymodloader.api.content.effect

Generated

This page is generated from the source's Javadoc by ./gradlew apiReference. Do not edit it; fix the source comment and generate it again.

TypeKindDescription
EffectBehaviorfunctional interfaceWhat a mod status effect does while active.
EffectCategoryenumWhether an effect helps, harms, or neither (affects icons, milk, and some mob reactions).
EffectDefinitionrecordA mod status effect.
EffectHandleinterfaceA 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.

ParameterTypeDescription
entityLivingEntityView—
amplifierint0 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).

ConstantDescription
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.

ComponentTypeDescription
categoryEffectCategoryhelpful, harmful, or neutral
colorintparticle colour as 0xRRGGBB
tickIntervalintticks between EffectBehavior.onTick calls, at least 1
behaviorEffectBehaviorwhat 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

Buy me a coffee