Package etithespirit.orimod.util
Class EffectConstructors
java.lang.Object
etithespirit.orimod.util.EffectConstructors
This class contains utilities needed to construct effects shorthand.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraft.world.effect.MobEffectInstance
constructEffect
(net.minecraft.world.effect.MobEffect effect, int duration) A simple method of constructing an effect instance from this effect that allows for editing the most common flags.
Sets duration to 0 and particles to false.static net.minecraft.world.effect.MobEffectInstance
constructEffect
(net.minecraft.world.effect.MobEffect effect, int duration, int amplifier) A simple method of constructing an effect instance from this effect that allows for editing the most common flags.
For help in the EffectInstance constructor, its parameters are:Effect potionIn, int durationIn, int amplifierIn, boolean ambientIn, boolean showParticles, boolean showIcon
wstatic net.minecraft.world.effect.MobEffectInstance
constructEffect
(net.minecraft.world.effect.MobEffect effect, int duration, int amplifier, boolean particles) A simple method of constructing an effect instance from this effect that allows for editing the most common flags.
For help in the EffectInstance constructor, its parameters are:Effect potionIn, int durationIn, int amplifierIn, boolean ambientIn, boolean showParticles, boolean showIcon
static net.minecraft.world.effect.MobEffectInstance
constructInfiniteEffect
(net.minecraft.world.effect.MobEffect effect) Constructs this potion effect with amplifier 0.static net.minecraft.world.effect.MobEffectInstance
constructInfiniteEffect
(net.minecraft.world.effect.MobEffect effect, int amplifier) Constructs this potion effect with the given amplifier.static net.minecraft.world.effect.MobEffectInstance
constructInfiniteEffect
(net.minecraft.world.effect.MobEffect effect, int amplifier, boolean particles) Constructs this potion effect with the given amplifier, particle state, and a timer duration that is effectively infinite.
-
Constructor Details
-
EffectConstructors
public EffectConstructors()
-
-
Method Details
-
constructEffect
public static net.minecraft.world.effect.MobEffectInstance constructEffect(net.minecraft.world.effect.MobEffect effect, int duration) A simple method of constructing an effect instance from this effect that allows for editing the most common flags.
Sets duration to 0 and particles to false.
For help in the EffectInstance constructor, its parameters are:Effect potionIn, int durationIn, int amplifierIn, boolean ambientIn, boolean showParticles, boolean showIcon
- Parameters:
effect
- The effect to give.duration
- How long it should last.- Returns:
- An EffectInstance for this Effect constructed with the given duration, amplifier 0, and no particles.
-
constructEffect
public static net.minecraft.world.effect.MobEffectInstance constructEffect(net.minecraft.world.effect.MobEffect effect, int duration, int amplifier) A simple method of constructing an effect instance from this effect that allows for editing the most common flags.
For help in the EffectInstance constructor, its parameters are:Effect potionIn, int durationIn, int amplifierIn, boolean ambientIn, boolean showParticles, boolean showIcon
w- Parameters:
effect
- The effect to give.duration
- How long it should last.amplifier
- The effect's level.- Returns:
- An EffectInstance for this Effect constructed with the given duration and amplifier, and with no particles.
-
constructEffect
public static net.minecraft.world.effect.MobEffectInstance constructEffect(net.minecraft.world.effect.MobEffect effect, int duration, int amplifier, boolean particles) A simple method of constructing an effect instance from this effect that allows for editing the most common flags.
For help in the EffectInstance constructor, its parameters are:Effect potionIn, int durationIn, int amplifierIn, boolean ambientIn, boolean showParticles, boolean showIcon
- Parameters:
effect
- The effect to give.duration
- How long it should last.amplifier
- The effect's level.particles
- Whether or not to render particles.- Returns:
- An EffectInstance for this Effect.
-
constructInfiniteEffect
public static net.minecraft.world.effect.MobEffectInstance constructInfiniteEffect(net.minecraft.world.effect.MobEffect effect) Constructs this potion effect with amplifier 0. Whether or not it renders particles is determined byPreferParticles()
. It has a timer duration that is effectively infinite.- Parameters:
effect
- The effect to give.- Returns:
- A new EffectInstance for this potion with amp=0, particles=false, duration=0x7FFFFFFF
-
constructInfiniteEffect
public static net.minecraft.world.effect.MobEffectInstance constructInfiniteEffect(net.minecraft.world.effect.MobEffect effect, int amplifier) Constructs this potion effect with the given amplifier. Whether or not it renders particles is determined byPreferParticles()
. It has a timer duration that is effectively infinite.- Parameters:
effect
- The effect to give.amplifier
- The amplifier of the potion.- Returns:
- A new EffectInstance for this potion with amp=(amplifier), particles=false, duration=0x7FFFFFFF
-
constructInfiniteEffect
public static net.minecraft.world.effect.MobEffectInstance constructInfiniteEffect(net.minecraft.world.effect.MobEffect effect, int amplifier, boolean particles) Constructs this potion effect with the given amplifier, particle state, and a timer duration that is effectively infinite.- Parameters:
effect
- The effect to give.amplifier
- The amplifier of the potion.particles
- Whether or not to render particles.- Returns:
- A new EffectInstance for this potion with amp=(amplifier), particles=(particles), duration=0x7FFFFFFF
-