Interface MobEffectInstance
A status effect running on a living entity, such as
minecraft:speed for ten seconds.
Instances are immutable and created through the MobEffectRegistry of the server.
- Since:
- 0.1.0
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDuration of an effect that never runs out.static final intHighest amplifier the client can display. -
Method Summary
Modifier and TypeMethodDescriptionbooleanambient()Returnstruefor effects coming from a beacon or a conduit, drawn with fainter particles.intReturns the level minus one, from0toMAX_AMPLIFIER.intduration()Returns the remaining ticks, orINFINITE_DURATION.booleanReturnstrueif this effect never runs out.booleanshowIcon()Returnstruewhen the icon is shown in the HUD of a player.Returns a builder starting from this effect, to derive a changed copy.type()Returns the effect, aminecraft:mob_effectentry.booleanvisible()Returnstruewhen the swirling particles are shown.
-
Field Details
-
INFINITE_DURATION
static final int INFINITE_DURATIONDuration of an effect that never runs out.- Since:
- 0.1.0
- See Also:
-
MAX_AMPLIFIER
static final int MAX_AMPLIFIERHighest amplifier the client can display.- Since:
- 0.1.0
- See Also:
-
-
Method Details
-
type
-
duration
int duration()Returns the remaining ticks, orINFINITE_DURATION.- Returns:
- the remaining ticks, or
INFINITE_DURATION - Since:
- 0.1.0
-
amplifier
int amplifier()Returns the level minus one, from0toMAX_AMPLIFIER.- Returns:
- the level minus one, from
0toMAX_AMPLIFIER - Since:
- 0.1.0
-
ambient
boolean ambient()Returnstruefor effects coming from a beacon or a conduit, drawn with fainter particles.- Returns:
truefor effects coming from a beacon or a conduit, drawn with fainter particles- Since:
- 0.1.0
-
visible
boolean visible()Returnstruewhen the swirling particles are shown.- Returns:
truewhen the swirling particles are shown- Since:
- 0.1.0
-
showIcon
boolean showIcon()Returnstruewhen the icon is shown in the HUD of a player.- Returns:
truewhen the icon is shown in the HUD of a player- Since:
- 0.1.0
-
isInfinite
boolean isInfinite()Returnstrueif this effect never runs out.- Returns:
trueif this effect never runs out- Since:
- 0.1.0
-
toBuilder
MobEffectInstance.Builder toBuilder()Returns a builder starting from this effect, to derive a changed copy.- Returns:
- a builder starting from this effect, to derive a changed copy
- Since:
- 0.1.0
-