Interface MobEffectDefinition.Builder
- Enclosing interface:
MobEffectDefinition
Builds a
MobEffectDefinition.- Since:
- 0.1.0
-
Method Summary
Modifier and TypeMethodDescriptionbehaviour(MobEffectBehaviour behaviour) build()Returns the definition, to hand toMobEffectRegistry.register(MobEffectDefinition, Plugin).category(MobEffectDefinition.Category category) networkId(int networkId) Asks for a fixed network ID, to match the one the client mod gives the effect.
-
Method Details
-
category
- Parameters:
category- whether the effect helps or harms;MobEffectDefinition.Category.NEUTRALby default- Returns:
- this builder
- Since:
- 0.1.0
-
fallback
- Parameters:
fallback- the vanilla effect shown to clients that do not know this one- Returns:
- this builder
- Throws:
IllegalArgumentException- iffallbackis not a vanilla effect- Since:
- 0.1.0
-
knownBy
- Parameters:
knownBy- picks the players whose client knows this effect; nobody by default- Returns:
- this builder
- Since:
- 0.1.0
-
networkId
Asks for a fixed network ID, to match the one the client mod gives the effect.- Parameters:
networkId- the network ID, after the vanilla effects- Returns:
- this builder
- Since:
- 0.1.0
-
behaviour
- Parameters:
behaviour- what the effect does; nothing by default- Returns:
- this builder
- Since:
- 0.1.0
-
build
MobEffectDefinition build()Returns the definition, to hand toMobEffectRegistry.register(MobEffectDefinition, Plugin).- Returns:
- the definition, to hand to
MobEffectRegistry.register(MobEffectDefinition, Plugin) - Since:
- 0.1.0
-