Uses of Class
net.minecraft.world.effect.MobEffectInstance
Packages that use MobEffectInstance
Package
Description
Events fired only on the client-side, chiefly related to rendering and user interfaces (screens and input).
-
Uses of MobEffectInstance in net.minecraft.advancements.critereon
Methods in net.minecraft.advancements.critereon with parameters of type MobEffectInstanceModifier and TypeMethodDescriptionboolean
MobEffectsPredicate.MobEffectInstancePredicate.matches
(MobEffectInstance pEffect) Method parameters in net.minecraft.advancements.critereon with type arguments of type MobEffectInstanceModifier and TypeMethodDescriptionboolean
MobEffectsPredicate.matches
(Map<Holder<MobEffect>, MobEffectInstance> pEffects) -
Uses of MobEffectInstance in net.minecraft.client.gui.screens.inventory
Methods in net.minecraft.client.gui.screens.inventory with parameters of type MobEffectInstanceModifier and TypeMethodDescriptionprivate Component
EffectRenderingInventoryScreen.getEffectName
(MobEffectInstance pEffect) Method parameters in net.minecraft.client.gui.screens.inventory with type arguments of type MobEffectInstanceModifier and TypeMethodDescriptionprivate void
EffectRenderingInventoryScreen.renderBackgrounds
(GuiGraphics pGuiGraphics, int pRenderX, int pYOffset, Iterable<MobEffectInstance> pEffects, boolean pIsSmall) private void
EffectRenderingInventoryScreen.renderIcons
(GuiGraphics pGuiGraphics, int pRenderX, int pYOffset, Iterable<MobEffectInstance> pEffects, boolean pIsSmall) private void
EffectRenderingInventoryScreen.renderLabels
(GuiGraphics pGuiGraphics, int pRenderX, int pYOffset, Iterable<MobEffectInstance> pEffects) -
Uses of MobEffectInstance in net.minecraft.client.player
Methods in net.minecraft.client.player that return MobEffectInstance -
Uses of MobEffectInstance in net.minecraft.client.renderer
Methods in net.minecraft.client.renderer with parameters of type MobEffectInstanceModifier and TypeMethodDescriptionfloat
FogRenderer.DarknessFogFunction.getModifiedVoidDarkness
(LivingEntity p_234189_, MobEffectInstance p_234190_, float p_234191_, float p_234192_) default float
FogRenderer.MobEffectFogFunction.getModifiedVoidDarkness
(LivingEntity pEntity, MobEffectInstance pEffectInstance, float p_234210_, float pPartialTick) void
FogRenderer.BlindnessFogFunction.setupFog
(FogRenderer.FogData p_234181_, LivingEntity p_234182_, MobEffectInstance p_234183_, float p_234184_, float p_234185_) void
FogRenderer.DarknessFogFunction.setupFog
(FogRenderer.FogData p_234194_, LivingEntity p_234195_, MobEffectInstance p_234196_, float p_234197_, float p_234198_) void
FogRenderer.MobEffectFogFunction.setupFog
(FogRenderer.FogData pFogData, LivingEntity pEntity, MobEffectInstance pEffectInstance, float pFarPlaneDistance, float p_234216_) -
Uses of MobEffectInstance in net.minecraft.network.protocol.game
Constructors in net.minecraft.network.protocol.game with parameters of type MobEffectInstanceModifierConstructorDescriptionClientboundUpdateMobEffectPacket
(int pEntityId, MobEffectInstance pEffect, boolean pBlend) -
Uses of MobEffectInstance in net.minecraft.server.level
Methods in net.minecraft.server.level with parameters of type MobEffectInstanceModifier and TypeMethodDescriptionprotected void
ServerPlayer.onEffectAdded
(MobEffectInstance pEffectInstance, Entity pEntity) protected void
ServerPlayer.onEffectRemoved
(MobEffectInstance pEffect) protected void
ServerPlayer.onEffectUpdated
(MobEffectInstance pEffectInstance, boolean pForced, Entity pEntity) -
Uses of MobEffectInstance in net.minecraft.world.effect
Fields in net.minecraft.world.effect declared as MobEffectInstanceModifier and TypeFieldDescriptionprivate MobEffectInstance
MobEffectInstance.hiddenEffect
A hidden effect which is not shown to the player.Fields in net.minecraft.world.effect with type parameters of type MobEffectInstanceModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<MobEffectInstance> MobEffectInstance.CODEC
private final Function
<MobEffectInstance, ParticleOptions> MobEffect.particleFactory
static final StreamCodec
<RegistryFriendlyByteBuf, MobEffectInstance> MobEffectInstance.STREAM_CODEC
Methods in net.minecraft.world.effect that return MobEffectInstanceModifier and TypeMethodDescriptionstatic MobEffectInstance
MobEffectInstance.load
(CompoundTag pNbt) Read a custom potion effect from a potion item's NBT data.Methods in net.minecraft.world.effect with parameters of type MobEffectInstanceModifier and TypeMethodDescriptionstatic List
<ServerPlayer> MobEffectUtil.addEffectToPlayersAround
(ServerLevel pLevel, Entity pSource, Vec3 pPos, double pRadius, MobEffectInstance pEffect, int pDuration) int
MobEffectInstance.compareTo
(MobEffectInstance pOther) private static float
MobEffectInstance.BlendState.computeTarget
(MobEffectInstance pEffect) void
MobEffectInstance.copyBlendState
(MobEffectInstance pEffectInstance) MobEffect.createParticleOptions
(MobEffectInstance pEffect) static Component
MobEffectUtil.formatDuration
(MobEffectInstance pEffect, float pDurationFactor, float pTicksPerSecond) private static int
MobEffectInstance.BlendState.getBlendDuration
(MobEffectInstance pEffect) private boolean
MobEffectInstance.isShorterDurationThan
(MobEffectInstance pOther) (package private) void
MobEffectInstance.setDetailsFrom
(MobEffectInstance pEffectInstance) void
MobEffectInstance.BlendState.setImmediate
(MobEffectInstance pEffectInstance) void
MobEffectInstance.BlendState.tick
(MobEffectInstance pEffect) boolean
MobEffectInstance.update
(MobEffectInstance pOther) Constructors in net.minecraft.world.effect with parameters of type MobEffectInstanceModifierConstructorDescriptionMobEffectInstance
(Holder<MobEffect> pEffect, int pDuration, int pAmplifier, boolean pAmbient, boolean pVisible, boolean pShowIcon, MobEffectInstance pHiddenEffect) MobEffectInstance
(MobEffectInstance pOther) -
Uses of MobEffectInstance in net.minecraft.world.entity
Fields in net.minecraft.world.entity with type parameters of type MobEffectInstanceModifier and TypeFieldDescriptionprivate final Map
<Holder<MobEffect>, MobEffectInstance> LivingEntity.activeEffects
Methods in net.minecraft.world.entity that return MobEffectInstanceMethods in net.minecraft.world.entity that return types with arguments of type MobEffectInstanceModifier and TypeMethodDescriptionLivingEntity.getActiveEffects()
LivingEntity.getActiveEffectsMap()
Methods in net.minecraft.world.entity with parameters of type MobEffectInstanceModifier and TypeMethodDescriptionvoid
AreaEffectCloud.addEffect
(MobEffectInstance pEffectInstance) final boolean
LivingEntity.addEffect
(MobEffectInstance pEffectInstance) boolean
LivingEntity.addEffect
(MobEffectInstance pEffectInstance, Entity pEntity) boolean
LivingEntity.canBeAffected
(MobEffectInstance pEffectInstance) Deprecated.void
LivingEntity.forceAddEffect
(MobEffectInstance pInstance, Entity pEntity) protected void
LivingEntity.onEffectAdded
(MobEffectInstance pEffectInstance, Entity pEntity) protected void
LivingEntity.onEffectRemoved
(MobEffectInstance pEffectInstance) protected void
LivingEntity.onEffectUpdated
(MobEffectInstance pEffectInstance, boolean pForced, Entity pEntity) void
LivingEntity.sendEffectToPassengers
(MobEffectInstance pEffectInstance) Method parameters in net.minecraft.world.entity with type arguments of type MobEffectInstanceModifier and TypeMethodDescriptionstatic boolean
LivingEntity.areAllEffectsAmbient
(Collection<MobEffectInstance> pPotionEffects) Returnstrue
if all the potion effects in the specified collection are ambient. -
Uses of MobEffectInstance in net.minecraft.world.entity.boss.enderdragon
Methods in net.minecraft.world.entity.boss.enderdragon with parameters of type MobEffectInstanceModifier and TypeMethodDescriptionboolean
EnderDragon.addEffect
(MobEffectInstance pEffectInstance, Entity pEntity) -
Uses of MobEffectInstance in net.minecraft.world.entity.boss.wither
Methods in net.minecraft.world.entity.boss.wither with parameters of type MobEffectInstanceModifier and TypeMethodDescriptionboolean
WitherBoss.addEffect
(MobEffectInstance pEffectInstance, Entity pEntity) boolean
WitherBoss.canBeAffected
(MobEffectInstance pPotioneffect) -
Uses of MobEffectInstance in net.minecraft.world.entity.monster
Methods in net.minecraft.world.entity.monster with parameters of type MobEffectInstanceModifier and TypeMethodDescriptionboolean
Spider.canBeAffected
(MobEffectInstance pPotioneffect) boolean
WitherSkeleton.canBeAffected
(MobEffectInstance pPotioneffect) -
Uses of MobEffectInstance in net.minecraft.world.entity.projectile
Methods in net.minecraft.world.entity.projectile with parameters of type MobEffectInstanceMethod parameters in net.minecraft.world.entity.projectile with type arguments of type MobEffectInstanceModifier and TypeMethodDescriptionprivate void
ThrownPotion.applySplash
(Iterable<MobEffectInstance> pEffects, Entity pEntity) -
Uses of MobEffectInstance in net.minecraft.world.food
Fields in net.minecraft.world.food with type parameters of type MobEffectInstanceModifier and TypeFieldDescriptionprivate final Supplier
<MobEffectInstance> FoodProperties.PossibleEffect.effectSupplier
The field for theeffectSupplier
record component.Methods in net.minecraft.world.food that return MobEffectInstanceMethods in net.minecraft.world.food that return types with arguments of type MobEffectInstanceModifier and TypeMethodDescriptionFoodProperties.PossibleEffect.effectSupplier()
Returns the value of theeffectSupplier
record component.Methods in net.minecraft.world.food with parameters of type MobEffectInstanceModifier and TypeMethodDescriptionFoodProperties.Builder.effect
(MobEffectInstance pEffect, float pProbability) Deprecated.Method parameters in net.minecraft.world.food with type arguments of type MobEffectInstanceModifier and TypeMethodDescriptionFoodProperties.Builder.effect
(Supplier<MobEffectInstance> effectIn, float probability) Constructors in net.minecraft.world.food with parameters of type MobEffectInstanceModifierConstructorDescriptionprivate
PossibleEffect
(MobEffectInstance effect, float probability) Constructor parameters in net.minecraft.world.food with type arguments of type MobEffectInstanceModifierConstructorDescriptionPossibleEffect
(Supplier<MobEffectInstance> effectSupplier, float probability) Creates an instance of aPossibleEffect
record class. -
Uses of MobEffectInstance in net.minecraft.world.item.alchemy
Fields in net.minecraft.world.item.alchemy with type parameters of type MobEffectInstanceModifier and TypeFieldDescriptionprivate final List
<MobEffectInstance> PotionContents.customEffects
The field for thecustomEffects
record component.private final List
<MobEffectInstance> Potion.effects
Methods in net.minecraft.world.item.alchemy that return types with arguments of type MobEffectInstanceModifier and TypeMethodDescriptionPotionContents.customEffects()
Returns the value of thecustomEffects
record component.PotionContents.getAllEffects()
Potion.getEffects()
Methods in net.minecraft.world.item.alchemy with parameters of type MobEffectInstanceMethod parameters in net.minecraft.world.item.alchemy with type arguments of type MobEffectInstanceModifier and TypeMethodDescriptionstatic void
PotionContents.addPotionTooltip
(Iterable<MobEffectInstance> pEffects, Consumer<Component> pTooltipAdder, float pDurationFactor, float pTicksPerSecond) void
PotionContents.forEachEffect
(Consumer<MobEffectInstance> pAction) static int
PotionContents.getColor
(Iterable<MobEffectInstance> pEffects) static OptionalInt
PotionContents.getColorOptional
(Iterable<MobEffectInstance> pEffects) Constructors in net.minecraft.world.item.alchemy with parameters of type MobEffectInstanceModifierConstructorDescriptionPotion
(String pName, MobEffectInstance... pEffects) Potion
(MobEffectInstance... pEffects) Constructor parameters in net.minecraft.world.item.alchemy with type arguments of type MobEffectInstanceModifierConstructorDescriptionPotionContents
(Optional<Holder<Potion>> potion, Optional<Integer> customColor, List<MobEffectInstance> customEffects) Creates an instance of aPotionContents
record class. -
Uses of MobEffectInstance in net.minecraft.world.item.component
Methods in net.minecraft.world.item.component that return MobEffectInstance -
Uses of MobEffectInstance in net.neoforged.neoforge.client
Methods in net.neoforged.neoforge.client with parameters of type MobEffectInstanceModifier and TypeMethodDescriptionClientHooks.getEffectTooltip
(EffectRenderingInventoryScreen<?> screen, MobEffectInstance effectInst, List<Component> tooltip) Fires theGatherEffectScreenTooltipsEvent
and returns the resulting tooltip lines.static boolean
ClientHooks.shouldRenderEffect
(MobEffectInstance effectInstance) -
Uses of MobEffectInstance in net.neoforged.neoforge.client.event
Fields in net.neoforged.neoforge.client.event declared as MobEffectInstanceModifier and TypeFieldDescriptionprotected final MobEffectInstance
GatherEffectScreenTooltipsEvent.effectInst
Methods in net.neoforged.neoforge.client.event that return MobEffectInstanceConstructors in net.neoforged.neoforge.client.event with parameters of type MobEffectInstanceModifierConstructorDescriptionGatherEffectScreenTooltipsEvent
(EffectRenderingInventoryScreen<?> screen, MobEffectInstance effectInst, List<Component> tooltip) -
Uses of MobEffectInstance in net.neoforged.neoforge.client.extensions.common
Methods in net.neoforged.neoforge.client.extensions.common with parameters of type MobEffectInstanceModifier and TypeMethodDescriptiondefault boolean
IClientMobEffectExtensions.isVisibleInGui
(MobEffectInstance instance) Queries whether the given effect should be shown in the HUD.default boolean
IClientMobEffectExtensions.isVisibleInInventory
(MobEffectInstance instance) Queries whether the given effect should be shown in the player's inventory.static IClientMobEffectExtensions
IClientMobEffectExtensions.of
(MobEffectInstance instance) default boolean
IClientMobEffectExtensions.renderGuiIcon
(MobEffectInstance instance, Gui gui, GuiGraphics guiGraphics, int x, int y, float z, float alpha) Renders the icon of the specified effect on the player's HUD.default boolean
IClientMobEffectExtensions.renderInventoryIcon
(MobEffectInstance instance, EffectRenderingInventoryScreen<?> screen, GuiGraphics guiGraphics, int x, int y, int blitOffset) Renders the icon of the specified effect in the player's inventory.default boolean
IClientMobEffectExtensions.renderInventoryText
(MobEffectInstance instance, EffectRenderingInventoryScreen<?> screen, GuiGraphics guiGraphics, int x, int y, int blitOffset) Renders the text of the specified effect in the player's inventory. -
Uses of MobEffectInstance in net.neoforged.neoforge.common
Methods in net.neoforged.neoforge.common with parameters of type MobEffectInstanceModifier and TypeMethodDescriptionstatic boolean
CommonHooks.canMobEffectBeApplied
(LivingEntity entity, MobEffectInstance effect) Deprecated, for removal: This API element is subject to removal in a future version.static boolean
CommonHooks.canMobEffectBeApplied
(LivingEntity entity, MobEffectInstance effect, @Nullable Entity source) Checks if a mob effect can be applied to an entity by firingMobEffectEvent.Applicable
. -
Uses of MobEffectInstance in net.neoforged.neoforge.common.extensions
Methods in net.neoforged.neoforge.common.extensions with parameters of type MobEffectInstanceModifier and TypeMethodDescriptiondefault void
IMobEffectExtension.fillEffectCures
(Set<EffectCure> cures, MobEffectInstance effectInstance) Fill the given set with theEffectCure
s this effect should be curable with by defaultdefault int
IMobEffectExtension.getSortOrder
(MobEffectInstance effectInstance) Used for determiningMobEffect
sort order in GUIs. -
Uses of MobEffectInstance in net.neoforged.neoforge.event
Methods in net.neoforged.neoforge.event with parameters of type MobEffectInstanceModifier and TypeMethodDescriptionstatic boolean
EventHooks.onEffectRemoved
(LivingEntity entity, MobEffectInstance effectInstance, @Nullable EffectCure cure) -
Uses of MobEffectInstance in net.neoforged.neoforge.event.entity.living
Fields in net.neoforged.neoforge.event.entity.living declared as MobEffectInstanceModifier and TypeFieldDescriptionprivate final MobEffectInstance
EffectParticleModificationEvent.effect
protected final @Nullable MobEffectInstance
MobEffectEvent.effectInstance
private final MobEffectInstance
MobEffectEvent.Added.oldEffectInstance
Methods in net.neoforged.neoforge.event.entity.living that return MobEffectInstanceModifier and TypeMethodDescriptionEffectParticleModificationEvent.getEffect()
MobEffectEvent.Added.getEffectInstance()
MobEffectEvent.Applicable.getEffectInstance()
@Nullable MobEffectInstance
MobEffectEvent.getEffectInstance()
@Nullable MobEffectInstance
MobEffectEvent.Remove.getEffectInstance()
@Nullable MobEffectInstance
MobEffectEvent.Added.getOldEffectInstance()
Constructors in net.neoforged.neoforge.event.entity.living with parameters of type MobEffectInstanceModifierConstructorDescriptionAdded
(LivingEntity living, MobEffectInstance oldEffectInstance, MobEffectInstance newEffectInstance, Entity source) Applicable
(LivingEntity living, MobEffectInstance effectInstance, @Nullable Entity source) EffectParticleModificationEvent
(LivingEntity entity, MobEffectInstance effect) Expired
(LivingEntity living, MobEffectInstance effectInstance) protected
MobEffectEvent
(LivingEntity living, MobEffectInstance effectInstance) Remove
(LivingEntity living, MobEffectInstance effectInstance, @Nullable EffectCure cure)
CommonHooks.canMobEffectBeApplied(LivingEntity, MobEffectInstance, Entity)
instead.