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 effect) Method parameters in net.minecraft.advancements.critereon with type arguments of type MobEffectInstanceModifier and TypeMethodDescriptionboolean
MobEffectsPredicate.matches
(Map<Holder<MobEffect>, MobEffectInstance> effects) -
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 effect) Method parameters in net.minecraft.client.gui.screens.inventory with type arguments of type MobEffectInstanceModifier and TypeMethodDescriptionprivate void
EffectRenderingInventoryScreen.renderBackgrounds
(GuiGraphics guiGraphics, int renderX, int yOffset, Iterable<MobEffectInstance> effects, boolean isSmall) private void
EffectRenderingInventoryScreen.renderIcons
(GuiGraphics guiGraphics, int renderX, int yOffset, Iterable<MobEffectInstance> effects, boolean isSmall) private void
EffectRenderingInventoryScreen.renderLabels
(GuiGraphics guiGraphics, int renderX, int yOffset, Iterable<MobEffectInstance> effects) -
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 entity, MobEffectInstance effectInstance, float p_234210_, float partialTick) 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 fogData, LivingEntity entity, MobEffectInstance effectInstance, float farPlaneDistance, 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 entityId, MobEffectInstance effect, boolean blend) -
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 effectInstance, Entity entity) protected void
ServerPlayer.onEffectRemoved
(MobEffectInstance effect) protected void
ServerPlayer.onEffectUpdated
(MobEffectInstance effectInstance, boolean forced, Entity entity) -
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 nbt) 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 level, Entity source, Vec3 pos, double radius, MobEffectInstance effect, int duration) int
MobEffectInstance.compareTo
(MobEffectInstance other) private static float
MobEffectInstance.BlendState.computeTarget
(MobEffectInstance effect) void
MobEffectInstance.copyBlendState
(MobEffectInstance effectInstance) MobEffect.createParticleOptions
(MobEffectInstance effect) static Component
MobEffectUtil.formatDuration
(MobEffectInstance effect, float durationFactor, float ticksPerSecond) private static int
MobEffectInstance.BlendState.getBlendDuration
(MobEffectInstance effect) private boolean
MobEffectInstance.isShorterDurationThan
(MobEffectInstance other) (package private) void
MobEffectInstance.setDetailsFrom
(MobEffectInstance effectInstance) void
MobEffectInstance.BlendState.setImmediate
(MobEffectInstance effectInstance) void
MobEffectInstance.BlendState.tick
(MobEffectInstance effect) boolean
MobEffectInstance.update
(MobEffectInstance other) Constructors in net.minecraft.world.effect with parameters of type MobEffectInstanceModifierConstructorDescriptionMobEffectInstance
(Holder<MobEffect> effect, int duration, int amplifier, boolean ambient, boolean visible, boolean showIcon, MobEffectInstance hiddenEffect) -
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 effectInstance) final boolean
LivingEntity.addEffect
(MobEffectInstance effectInstance) boolean
LivingEntity.addEffect
(MobEffectInstance effectInstance, Entity entity) boolean
LivingEntity.canBeAffected
(MobEffectInstance effectInstance) Deprecated.void
LivingEntity.forceAddEffect
(MobEffectInstance instance, Entity entity) protected void
LivingEntity.onEffectAdded
(MobEffectInstance effectInstance, Entity entity) protected void
LivingEntity.onEffectRemoved
(MobEffectInstance effectInstance) protected void
LivingEntity.onEffectUpdated
(MobEffectInstance effectInstance, boolean forced, Entity entity) void
LivingEntity.sendEffectToPassengers
(MobEffectInstance effectInstance) Method parameters in net.minecraft.world.entity with type arguments of type MobEffectInstanceModifier and TypeMethodDescriptionstatic boolean
LivingEntity.areAllEffectsAmbient
(Collection<MobEffectInstance> potionEffects) 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 effectInstance, Entity entity) -
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 effectInstance, Entity entity) boolean
WitherBoss.canBeAffected
(MobEffectInstance potioneffect) -
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 potioneffect) boolean
WitherSkeleton.canBeAffected
(MobEffectInstance potioneffect) -
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> effects, Entity p_entity) -
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 effect, float probability) 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> effects, Consumer<Component> tooltipAdder, float durationFactor, float ticksPerSecond) void
PotionContents.forEachEffect
(Consumer<MobEffectInstance> action) static int
PotionContents.getColor
(Iterable<MobEffectInstance> effects) static OptionalInt
PotionContents.getColorOptional
(Iterable<MobEffectInstance> effects) Constructors in net.minecraft.world.item.alchemy with parameters of type MobEffectInstanceModifierConstructorDescriptionPotion
(String name, MobEffectInstance... effects) Potion
(MobEffectInstance... effects) 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) 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) EffectParticleModificationEvent
(LivingEntity entity, MobEffectInstance effect) Expired
(LivingEntity living, MobEffectInstance effectInstance) protected
MobEffectEvent
(LivingEntity living, MobEffectInstance effectInstance) Remove
(LivingEntity living, MobEffectInstance effectInstance, @Nullable EffectCure cure)