net.minecraft.world.effect

public class MobEffect

implements FeatureElement

bun
net.minecraft.world.effect.MobEffect
net.minecraft.class_1291
net.minecraft.entity.effect.StatusEffect
net.minecraft.world.effect.MobEffectList

Field summary

Modifier and TypeField
public static final com.mojang.serialization.Codec<Holder<MobEffect>>
a
CODEC
field_51933
ENTRY_CODEC
public static final StreamCodec<RegistryFriendlyByteBuf, Holder<MobEffect>>
b
STREAM_CODEC
field_51934
ENTRY_PACKET_CODEC
private static final int
c
AMBIENT_ALPHA
field_49789
AMBIENT_PARTICLE_ALPHA
private final Map<Holder<Attribute>, MobEffect$AttributeTemplate>
d
attributeModifiers
field_5885
attributeModifiers
private final MobEffectCategory
e
category
field_18270
category
private final int
f
color
field_5886
color
private final Function<MobEffectInstance, ParticleOptions>
g
particleFactory
field_49790
particleFactory
private String
h
descriptionId
field_5883
translationKey
private int
i
blendDurationTicks
field_47738
fadeTicks
private Optional<SoundEvent>
j
soundOnAdded
field_50114
applySound
private FeatureFlagSet
k
requiredFeatures
field_50115
requiredFeatures

Constructor summary

ModifierConstructor
protected (MobEffectCategory category, int color)
protected (MobEffectCategory category, int color, ParticleOptions particleEffect)

Method summary

Modifier and TypeMethod
public int
b()
getBlendDurationTicks()
method_55652()
getFadeTicks()
public boolean
a(ash arg0, bwg arg1, int arg2)
applyEffectTick(ServerLevel arg0, LivingEntity arg1, int arg2)
method_5572(class_3218 arg0, class_1309 arg1, int arg2)
applyUpdateEffect(ServerWorld world, LivingEntity entity, int amplifier)
public void
a(ash arg0, bvk arg1, bvk arg2, bwg arg3, int arg4, double arg5)
applyInstantenousEffect(ServerLevel arg0, Entity arg1, Entity arg2, LivingEntity arg3, int arg4, double arg5)
method_5564(class_3218 arg0, class_1297 arg1, class_1297 arg2, class_1309 arg3, int arg4, double arg5)
applyInstantEffect(ServerWorld world, Entity effectEntity, Entity attacker, LivingEntity target, int amplifier, double proximity)
public boolean
a(int arg0, int arg1)
shouldApplyEffectTickThisTick(int arg0, int arg1)
method_5552(int arg0, int arg1)
canApplyUpdateEffect(int duration, int amplifier)
public void
a(bwg arg0, int arg1)
onEffectStarted(LivingEntity arg0, int arg1)
method_52520(class_1309 arg0, int arg1)
onApplied(LivingEntity entity, int amplifier)
public void
b(bwg arg0, int arg1)
onEffectAdded(LivingEntity arg0, int arg1)
method_58620(class_1309 arg0, int arg1)
playApplySound(LivingEntity entity, int amplifier)
public void
a(ash arg0, bwg arg1, int arg2, bvk$d arg3)
onMobRemoved(ServerLevel arg0, LivingEntity arg1, int arg2, Entity$RemovalReason arg3)
method_58617(class_3218 arg0, class_1309 arg1, int arg2, class_1297$class_5529 arg3)
onEntityRemoval(ServerWorld world, LivingEntity entity, int amplifier, Entity$RemovalReason reason)
public void
a(ash arg0, bwg arg1, int arg2, bua arg3, float arg4)
onMobHurt(ServerLevel arg0, LivingEntity arg1, int arg2, DamageSource arg3, float arg4)
method_58614(class_3218 arg0, class_1309 arg1, int arg2, class_1282 arg3, float arg4)
onEntityDamage(ServerWorld world, LivingEntity entity, int amplifier, DamageSource source, float amount)
public boolean
a()
isInstantenous()
method_5561()
isInstant()
protected String
c()
getOrCreateDescriptionId()
method_5559()
loadTranslationKey()
public String
d()
getDescriptionId()
method_5567()
getTranslationKey()
public Component
e()
getDisplayName()
method_5560()
getName()
public MobEffectCategory
f()
getCategory()
method_18792()
getCategory()
public int
g()
getColor()
method_5556()
getColor()
public MobEffect
a(jq<bxj> arg0, alz arg1, double arg2, bxm$a arg3)
addAttributeModifier(Holder<Attribute> arg0, ResourceLocation arg1, double arg2, AttributeModifier$Operation arg3)
method_5566(class_6880<class_1320> arg0, class_2960 arg1, double arg2, class_1322$class_1323 arg3)
addAttributeModifier(RegistryEntry<EntityAttribute> attribute, Identifier id, double amount, EntityAttributeModifier$Operation operation)
public MobEffect
a(int arg0)
setBlendDuration(int arg0)
method_55649(int arg0)
fadeTicks(int fadeTicks)
public void
a(int arg0, BiConsumer<jq<bxj>, bxm> arg1)
createModifiers(int arg0, BiConsumer<Holder<Attribute>, AttributeModifier> arg1)
method_55650(int arg0, BiConsumer<class_6880<class_1320>, class_1322> arg1)
forEachAttributeModifier(int amplifier, BiConsumer<RegistryEntry<EntityAttribute>, EntityAttributeModifier> consumer)
public void
a(bxl arg0)
removeAttributeModifiers(AttributeMap arg0)
method_5562(class_5131 arg0)
onRemoved(AttributeContainer attributeContainer)
public void
a(bxl arg0, int arg1)
addAttributeModifiers(AttributeMap arg0, int arg1)
method_5555(class_5131 arg0, int arg1)
onApplied(AttributeContainer attributeContainer, int amplifier)
public boolean
h()
isBeneficial()
method_5573()
isBeneficial()
public ParticleOptions
a(bup arg0)
createParticleOptions(MobEffectInstance arg0)
method_58146(class_1293 arg0)
createParticle(StatusEffectInstance effect)
public MobEffect
a(axe arg0)
withSoundOnAdded(SoundEvent arg0)
method_58616(class_3414 arg0)
applySound(SoundEvent sound)
public MobEffect
a(csr... arg0)
requiredFeatures(FeatureFlag... arg0)
method_58619(class_7696... arg0)
requires(FeatureFlag... requiredFeatures)
public FeatureFlagSet
i()
requiredFeatures()
method_45322()
getRequiredFeatures()