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
Fields in net.minecraft.client.gui.screens.inventory declared as MobEffectInstanceMethods in net.minecraft.client.gui.screens.inventory with parameters of type MobEffectInstanceModifier and TypeMethodDescriptionprivate Component
EffectsInInventory.getEffectName
(MobEffectInstance pEffect) Method parameters in net.minecraft.client.gui.screens.inventory with type arguments of type MobEffectInstanceModifier and TypeMethodDescriptionprivate void
EffectsInInventory.renderBackgrounds
(GuiGraphics pGuiGraphics, int pX, int pY, Iterable<MobEffectInstance> pActiveEffects, boolean pLarge) private void
EffectsInInventory.renderIcons
(GuiGraphics pGuiGraphics, int pX, int pY, Iterable<MobEffectInstance> pActiveEffects, boolean pLarge) private void
EffectsInInventory.renderLabels
(GuiGraphics pGuiGraphics, int pX, int pY, Iterable<MobEffectInstance> pActiveEffects) -
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.onEffectUpdated
(MobEffectInstance pEffectInstance, boolean pForced, Entity pEntity) Method parameters in net.minecraft.server.level with type arguments of type MobEffectInstanceModifier and TypeMethodDescriptionprotected void
ServerPlayer.onEffectsRemoved
(Collection<MobEffectInstance> pEffects) -
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 MobEffectInstanceMethods 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) void
MobEffectInstance.copyBlendState
(MobEffectInstance pEffectInstance) MobEffect.createParticleOptions
(MobEffectInstance pEffect) static Component
MobEffectUtil.formatDuration
(MobEffectInstance pEffect, float pDurationFactor, float pTicksPerSecond) private static boolean
MobEffectInstance.BlendState.hasEffect
(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) Constructor parameters in net.minecraft.world.effect with type arguments of type MobEffectInstanceModifierConstructorDescriptionprotected
MobEffect
(MobEffectCategory pCategory, int pColor, Function<MobEffectInstance, ParticleOptions> particleFactory) Neo: Constructor that can take in the particle factory as a function of theMobEffectInstance
. -
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 MobEffectInstanceModifier and TypeMethodDescriptionfinal MobEffectInstance
LivingEntity.removeEffectNoUpdate
(Holder<MobEffect> pEffect) Methods 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.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.protected void
LivingEntity.onEffectsRemoved
(Collection<MobEffectInstance> pEffects) -
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 MobEffectInstance -
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, float pDurationScale) static OptionalInt
PotionContents.getColorOptional
(Iterable<MobEffectInstance> pEffects) Constructors in net.minecraft.world.item.alchemy with parameters of type MobEffectInstanceConstructor parameters in net.minecraft.world.item.alchemy with type arguments of type MobEffectInstanceModifierConstructorDescriptionPotionContents
(Optional<Holder<Potion>> potion, Optional<Integer> customColor, List<MobEffectInstance> customEffects, Optional<String> customName) 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.minecraft.world.item.consume_effects
Fields in net.minecraft.world.item.consume_effects with type parameters of type MobEffectInstanceModifier and TypeFieldDescriptionprivate final List
<MobEffectInstance> ApplyStatusEffectsConsumeEffect.effects
The field for theeffects
record component.Methods in net.minecraft.world.item.consume_effects that return types with arguments of type MobEffectInstanceModifier and TypeMethodDescriptionApplyStatusEffectsConsumeEffect.effects()
Returns the value of theeffects
record component.Constructors in net.minecraft.world.item.consume_effects with parameters of type MobEffectInstanceModifierConstructorDescriptionApplyStatusEffectsConsumeEffect
(MobEffectInstance p_366678_) ApplyStatusEffectsConsumeEffect
(MobEffectInstance p_366514_, float p_366567_) Constructor parameters in net.minecraft.world.item.consume_effects with type arguments of type MobEffectInstanceModifierConstructorDescriptionApplyStatusEffectsConsumeEffect
(List<MobEffectInstance> p_366447_) ApplyStatusEffectsConsumeEffect
(List<MobEffectInstance> effects, float probability) Creates an instance of aApplyStatusEffectsConsumeEffect
record class. -
Uses of MobEffectInstance in net.minecraft.world.level.block
Methods in net.minecraft.world.level.block that return MobEffectInstanceModifier and TypeMethodDescriptionEyeblossomBlock.getBeeInteractionEffect()
FlowerBlock.getBeeInteractionEffect()
WitherRoseBlock.getBeeInteractionEffect()
-
Uses of MobEffectInstance in net.neoforged.neoforge.client
Methods in net.neoforged.neoforge.client with parameters of type MobEffectInstanceModifier and TypeMethodDescriptionClientHooks.getEffectTooltip
(AbstractContainerScreen<?> 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
(AbstractContainerScreen<?> 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, AbstractContainerScreen<?> 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, AbstractContainerScreen<?> 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, @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 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) -
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)