Class ExpandMobEffect
java.lang.Object
com.blamejared.crafttweaker.natives.entity.effect.ExpandMobEffect
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraft.world.effect.MobEffectaddAttributeModifier(net.minecraft.world.effect.MobEffect internal, net.minecraft.world.entity.ai.attributes.Attribute attribute, net.minecraft.resources.ResourceLocation id, double value, net.minecraft.world.entity.ai.attributes.AttributeModifier.Operation operation) Adds an attribute modifier to the effect.static voidapplyEffectTick(net.minecraft.world.effect.MobEffect internal, net.minecraft.world.entity.LivingEntity entity, int amplifier) Applies the effect to the entity.static voidapplyInstantenousEffect(net.minecraft.world.effect.MobEffect internal, net.minecraft.world.entity.Entity source, net.minecraft.world.entity.Entity indirectSource, net.minecraft.world.entity.LivingEntity target, int amplifier, double effectiveness) Applies the effect to the entity.static Map<net.minecraft.world.entity.ai.attributes.Attribute, net.minecraft.world.entity.ai.attributes.AttributeModifier> getAttributeModifiers(net.minecraft.world.effect.MobEffect internal, int amplifier) Gets theAttributeModifierthat this effect adds with the given amplifier.static net.minecraft.world.effect.MobEffectCategorygetCategory(net.minecraft.world.effect.MobEffect internal) Gets theMobEffectCategoryof the effect.static intgetColor(net.minecraft.world.effect.MobEffect internal) Gets the color of the effect.static StringgetCommandString(net.minecraft.world.effect.MobEffect internal) Gets the command string of the effect.static StringgetDescriptionId(net.minecraft.world.effect.MobEffect internal) Gets the description ID of the effect.static net.minecraft.network.chat.ComponentgetDisplayName(net.minecraft.world.effect.MobEffect internal) Gets the display name of the effect.static net.minecraft.resources.ResourceLocationgetRegistryName(net.minecraft.world.effect.MobEffect internal) Gets the registry name of the effect.static booleanisBeneficial(net.minecraft.world.effect.MobEffect internal) Checks if the effect is beneficial.static booleanisInstantenous(net.minecraft.world.effect.MobEffect internal) Checks if the effect is instantenous.static booleanshouldApplyEffectTickThisTick(net.minecraft.world.effect.MobEffect internal, int duration, int amplifier) Checks if the effect should be applied this tick.
-
Constructor Details
-
ExpandMobEffect
public ExpandMobEffect()
-
-
Method Details
-
applyEffectTick
public static void applyEffectTick(net.minecraft.world.effect.MobEffect internal, net.minecraft.world.entity.LivingEntity entity, int amplifier) Applies the effect to the entity.- Parameters:
entity- The entity to apply the effect to.amplifier- The amplifier of the effect.
-
applyInstantenousEffect
public static void applyInstantenousEffect(net.minecraft.world.effect.MobEffect internal, @Nullable net.minecraft.world.entity.Entity source, @Nullable net.minecraft.world.entity.Entity indirectSource, net.minecraft.world.entity.LivingEntity target, int amplifier, double effectiveness) Applies the effect to the entity.- Parameters:
source- The source of the effect.indirectSource- The indirect source of the effect.target- The target of the effect.amplifier- The amplifier of the effect.effectiveness- The effectiveness of the effect.
-
shouldApplyEffectTickThisTick
public static boolean shouldApplyEffectTickThisTick(net.minecraft.world.effect.MobEffect internal, int duration, int amplifier) Checks if the effect should be applied this tick.- Parameters:
duration- The duration of the effect.amplifier- The amplifier of the effect.- Returns:
- True if the effect should be applied this tick, false otherwise.
-
isInstantenous
public static boolean isInstantenous(net.minecraft.world.effect.MobEffect internal) Checks if the effect is instantenous.- Returns:
- True if the effect is instantenous, false otherwise.
-
getDescriptionId
Gets the description ID of the effect.- Returns:
- The description ID of the effect.
-
getDisplayName
public static net.minecraft.network.chat.Component getDisplayName(net.minecraft.world.effect.MobEffect internal) Gets the display name of the effect.- Returns:
- The display name of the effect.
-
getCategory
public static net.minecraft.world.effect.MobEffectCategory getCategory(net.minecraft.world.effect.MobEffect internal) Gets theMobEffectCategoryof the effect.- Returns:
- The
MobEffectCategoryof the effect.
-
getColor
public static int getColor(net.minecraft.world.effect.MobEffect internal) Gets the color of the effect.- Returns:
- The color of the effect.
-
addAttributeModifier
public static net.minecraft.world.effect.MobEffect addAttributeModifier(net.minecraft.world.effect.MobEffect internal, net.minecraft.world.entity.ai.attributes.Attribute attribute, net.minecraft.resources.ResourceLocation id, double value, net.minecraft.world.entity.ai.attributes.AttributeModifier.Operation operation) Adds an attribute modifier to the effect.- Parameters:
attribute- The attribute to add the modifier to.id- The ID of the modifier.value- The value of the modifier.operation- The operation to apply to the modifier.- Returns:
- The effect with the added modifier.
-
getAttributeModifiers
public static Map<net.minecraft.world.entity.ai.attributes.Attribute,net.minecraft.world.entity.ai.attributes.AttributeModifier> getAttributeModifiers(net.minecraft.world.effect.MobEffect internal, int amplifier) Gets theAttributeModifierthat this effect adds with the given amplifier.- Parameters:
amplifier- The amplifier of the effect.- Returns:
- The
AttributeModifierthat this effect adds with the given amplifier.
-
isBeneficial
public static boolean isBeneficial(net.minecraft.world.effect.MobEffect internal) Checks if the effect is beneficial.- Returns:
- True if the effect is beneficial, false otherwise.
-
getRegistryName
public static net.minecraft.resources.ResourceLocation getRegistryName(net.minecraft.world.effect.MobEffect internal) Gets the registry name of the effect.- Returns:
- The registry name of the effect.
-
getCommandString
Gets the command string of the effect.- Returns:
- The command string of the effect.
-