Class LivingEvent.LivingVisibilityEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.entity.EntityEvent
net.neoforged.neoforge.event.entity.living.LivingEvent
net.neoforged.neoforge.event.entity.living.LivingEvent.LivingVisibilityEvent
- Enclosing class:
LivingEvent
-
Nested Class Summary
Nested classes/interfaces inherited from class net.neoforged.neoforge.event.entity.living.LivingEvent
LivingEvent.LivingJumpEvent, LivingEvent.LivingVisibilityEvent
Nested classes/interfaces inherited from class net.neoforged.neoforge.event.entity.EntityEvent
EntityEvent.EnteringSection, EntityEvent.EntityConstructing, EntityEvent.Size
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final @Nullable net.minecraft.world.entity.Entity
private double
-
Constructor Summary
ConstructorsConstructorDescriptionLivingVisibilityEvent
(net.minecraft.world.entity.LivingEntity livingEntity, @Nullable net.minecraft.world.entity.Entity lookingEntity, double originalMultiplier) -
Method Summary
Modifier and TypeMethodDescription@Nullable net.minecraft.world.entity.Entity
double
void
modifyVisibility
(double mod) Methods inherited from class net.neoforged.neoforge.event.entity.living.LivingEvent
getEntity
-
Field Details
-
visibilityModifier
private double visibilityModifier -
lookingEntity
@Nullable private final @Nullable net.minecraft.world.entity.Entity lookingEntity
-
-
Constructor Details
-
LivingVisibilityEvent
public LivingVisibilityEvent(net.minecraft.world.entity.LivingEntity livingEntity, @Nullable @Nullable net.minecraft.world.entity.Entity lookingEntity, double originalMultiplier)
-
-
Method Details
-
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 @Nullable net.minecraft.world.entity.Entity getLookingEntity()- Returns:
- The entity trying to see this LivingEntity, if available
-