Class ExpandMobEffectInstance
java.lang.Object
com.blamejared.crafttweaker.natives.entity.effect.ExpandMobEffectInstance
A MobEffectInstance is a wrapper around a
MobEffect that has a duration, amplifier, and other properties.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intcompareTo(net.minecraft.world.effect.MobEffectInstance internal, net.minecraft.world.effect.MobEffectInstance other) Compares theMobEffectInstanceto anotherMobEffectInstance.static intgetAmplifier(net.minecraft.world.effect.MobEffectInstance internal) Gets the amplifier of theMobEffectInstance.static StringgetDescriptionId(net.minecraft.world.effect.MobEffectInstance internal) Gets the description ID of theMobEffectInstance.static intgetDuration(net.minecraft.world.effect.MobEffectInstance internal) Gets the duration of theMobEffectInstance.static net.minecraft.world.effect.MobEffectgetEffect(net.minecraft.world.effect.MobEffectInstance internal) Gets theMobEffectof theMobEffectInstance.static booleanisAmbient(net.minecraft.world.effect.MobEffectInstance internal) Gets whether theMobEffectInstanceis ambient.static booleanisVisible(net.minecraft.world.effect.MobEffectInstance internal) Gets whether theMobEffectInstanceis visible.static net.minecraft.world.effect.MobEffectInstanceLoads aMobEffectInstancefrom aMapData.static net.minecraft.world.effect.MobEffectInstanceof(net.minecraft.world.effect.MobEffect mobEffect, int duration, int amplifier, boolean ambient, boolean visible, boolean showIcon, net.minecraft.world.effect.MobEffectInstance hiddenEffect) Creates a newMobEffectInstance.static MapDatasave(net.minecraft.world.effect.MobEffectInstance internal) Saves theMobEffectInstanceto aMapData.static booleanshowIcon(net.minecraft.world.effect.MobEffectInstance internal) Gets whether theMobEffectInstanceshould show an icon.static booleantick(net.minecraft.world.effect.MobEffectInstance internal, net.minecraft.world.entity.LivingEntity entity, Runnable onFinish) Ticks theMobEffectInstancefor the givenLivingEntity.static booleanupdate(net.minecraft.world.effect.MobEffectInstance internal, net.minecraft.world.effect.MobEffectInstance instance) Updates theMobEffectInstancewith the givenMobEffectInstance.
-
Constructor Details
-
ExpandMobEffectInstance
public ExpandMobEffectInstance()
-
-
Method Details
-
of
public static net.minecraft.world.effect.MobEffectInstance of(net.minecraft.world.effect.MobEffect mobEffect, int duration, int amplifier, boolean ambient, boolean visible, boolean showIcon, net.minecraft.world.effect.MobEffectInstance hiddenEffect) Creates a newMobEffectInstance.- Parameters:
mobEffect- TheMobEffectto create the instance for.duration- The duration of the effect.amplifier- The amplifier of the effect.ambient- Whether the effect is ambient.visible- Whether the effect is visible.showIcon- Whether the effect should show an icon.hiddenEffect- The hidden effect of the effect.- Returns:
- A new
MobEffectInstance.
-
update
public static boolean update(net.minecraft.world.effect.MobEffectInstance internal, net.minecraft.world.effect.MobEffectInstance instance) Updates theMobEffectInstancewith the givenMobEffectInstance.- Parameters:
instance- TheMobEffectInstanceto update with.- Returns:
- True if the
MobEffectInstancewas updated, false otherwise.
-
getEffect
public static net.minecraft.world.effect.MobEffect getEffect(net.minecraft.world.effect.MobEffectInstance internal) Gets theMobEffectof theMobEffectInstance.- Returns:
- The
MobEffectof theMobEffectInstance.
-
getDuration
public static int getDuration(net.minecraft.world.effect.MobEffectInstance internal) Gets the duration of theMobEffectInstance.- Returns:
- The duration of the
MobEffectInstance.
-
getAmplifier
public static int getAmplifier(net.minecraft.world.effect.MobEffectInstance internal) Gets the amplifier of theMobEffectInstance.- Returns:
- The amplifier of the
MobEffectInstance.
-
isAmbient
public static boolean isAmbient(net.minecraft.world.effect.MobEffectInstance internal) Gets whether theMobEffectInstanceis ambient.- Returns:
- True if the
MobEffectInstanceis ambient, false otherwise.
-
isVisible
public static boolean isVisible(net.minecraft.world.effect.MobEffectInstance internal) Gets whether theMobEffectInstanceis visible.- Returns:
- True if the
MobEffectInstanceis visible, false otherwise.
-
showIcon
public static boolean showIcon(net.minecraft.world.effect.MobEffectInstance internal) Gets whether theMobEffectInstanceshould show an icon.- Returns:
- True if the
MobEffectInstanceshould show an icon, false otherwise.
-
tick
public static boolean tick(net.minecraft.world.effect.MobEffectInstance internal, net.minecraft.world.entity.LivingEntity entity, Runnable onFinish) Ticks theMobEffectInstancefor the givenLivingEntity.- Parameters:
entity- TheLivingEntityto tick theMobEffectInstancefor.onFinish- TheRunnableto run when theMobEffectInstancefinishes.- Returns:
- True if the
MobEffectInstancewas ticked, false otherwise.
-
getDescriptionId
Gets the description ID of theMobEffectInstance.- Returns:
- The description ID of the
MobEffectInstance.
-
save
Saves theMobEffectInstanceto aMapData.- Returns:
- The
MapDatarepresentation of theMobEffectInstance.
-
load
Loads aMobEffectInstancefrom aMapData. -
compareTo
public static int compareTo(net.minecraft.world.effect.MobEffectInstance internal, net.minecraft.world.effect.MobEffectInstance other) Compares theMobEffectInstanceto anotherMobEffectInstance.- Parameters:
internal- TheMobEffectInstanceto compare.other- TheMobEffectInstanceto compare to.- Returns:
- The result of the comparison.
-