Class MobEffectEvent.Added
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.entity.EntityEvent
net.minecraftforge.event.entity.living.LivingEvent
net.minecraftforge.event.entity.living.MobEffectEvent
net.minecraftforge.event.entity.living.MobEffectEvent.Added
- Enclosing class:
- MobEffectEvent
This event is fired when a new 
MobEffectInstance is added to an entity.
 This event is also fired if an entity already has the effect but with a different duration or amplifier.
 This event is not Cancelable.
 This event does not have a result.- 
Nested Class SummaryNested classes/interfaces inherited from class net.minecraftforge.event.entity.living.MobEffectEventMobEffectEvent.Added, MobEffectEvent.Applicable, MobEffectEvent.Expired, MobEffectEvent.RemoveNested classes/interfaces inherited from class net.minecraftforge.event.entity.living.LivingEventLivingEvent.LivingJumpEvent, LivingEvent.LivingTickEvent, LivingEvent.LivingVisibilityEventNested classes/interfaces inherited from class net.minecraftforge.event.entity.EntityEventEntityEvent.EnteringSection, EntityEvent.EntityConstructing, EntityEvent.SizeNested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Eventnet.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
- 
Field SummaryFieldsFields inherited from class net.minecraftforge.event.entity.living.MobEffectEventeffectInstance
- 
Constructor SummaryConstructorsConstructorDescriptionAdded(LivingEntity living, MobEffectInstance oldEffectInstance, MobEffectInstance newEffectInstance, Entity source) 
- 
Method SummaryModifier and TypeMethodDescription@NotNull MobEffectInstance@Nullable Entity@Nullable MobEffectInstanceMethods inherited from class net.minecraftforge.event.entity.living.LivingEventgetEntityMethods inherited from class net.minecraftforge.eventbus.api.EventgetListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
- 
Field Details- 
oldEffectInstance
- 
source
 
- 
- 
Constructor Details- 
Addedpublic Added(LivingEntity living, MobEffectInstance oldEffectInstance, MobEffectInstance newEffectInstance, Entity source) 
 
- 
- 
Method Details- 
getEffectInstance- Overrides:
- getEffectInstancein class- MobEffectEvent
- Returns:
- the added MobEffectInstance. This is the unmerged MobEffectInstance if the old MobEffectInstance is not null.
 
- 
getOldEffectInstance- Returns:
- the old MobEffectInstance. This can be null if the entity did not have an effect of this kind before.
 
- 
getEffectSource- Returns:
- the entity source of the effect, or nullif none exists
 
 
-