Class LivingEvent.LivingVisibilityEvent
- java.lang.Object
-
- net.minecraftforge.eventbus.api.Event
-
- net.minecraftforge.event.entity.EntityEvent
-
- net.minecraftforge.event.entity.living.LivingEvent
-
- net.minecraftforge.event.entity.living.LivingEvent.LivingVisibilityEvent
-
- Enclosing class:
- LivingEvent
public static class LivingEvent.LivingVisibilityEvent extends LivingEvent
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.minecraftforge.event.entity.living.LivingEvent
LivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEvent, LivingEvent.LivingVisibilityEvent
-
Nested classes/interfaces inherited from class net.minecraftforge.event.entity.EntityEvent
EntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructing, EntityEvent.Size
-
-
Field Summary
Fields Modifier and Type Field Description private Entity
lookingEntity
private double
visibilityModifier
-
Constructor Summary
Constructors Constructor Description LivingVisibilityEvent(LivingEntity livingEntity, Entity lookingEntity, double originalMultiplier)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Entity
getLookingEntity()
double
getVisibilityModifier()
void
modifyVisibility(double mod)
-
Methods inherited from class net.minecraftforge.event.entity.living.LivingEvent
getEntityLiving
-
Methods inherited from class net.minecraftforge.event.entity.EntityEvent
getEntity
-
-
-
-
Field Detail
-
visibilityModifier
private double visibilityModifier
-
lookingEntity
@Nullable private final Entity lookingEntity
-
-
Constructor Detail
-
LivingVisibilityEvent
public LivingVisibilityEvent(LivingEntity livingEntity, @Nullable Entity lookingEntity, double originalMultiplier)
-
-
Method Detail
-
modifyVisibility
public void modifyVisibility(double mod)
- Parameters:
mod
- Is multiplied with the current modifier
-
getVisibilityModifier
public double getVisibilityModifier()
- Returns:
- The current modifier
-
getLookingEntity
@Nullable public Entity getLookingEntity()
- Returns:
- The entity trying to see this LivingEntity, if available
-
-