Class PlayerEvent.Visibility
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.entity.EntityEvent
net.minecraftforge.event.entity.living.LivingEvent
net.minecraftforge.event.entity.player.PlayerEvent
net.minecraftforge.event.entity.player.PlayerEvent.Visibility
- Enclosing class:
- PlayerEvent
Deprecated.
TODO 1.17 remove, unused
Fired when the world checks if a player is near enough to be attacked by an entity.
The resulting visibility modifier is multiplied by the one calculated by Minecraft (based on sneaking and more) and used to calculate the radius a player has to be in (targetDistance*modifier).
This can also be used to increase the visibility of a player, if it was decreased by Minecraft or other mods. But the resulting value cannot be higher than the standard target distance.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.event.entity.player.PlayerEvent
PlayerEvent.BreakSpeed, PlayerEvent.Clone, PlayerEvent.HarvestCheck, PlayerEvent.ItemCraftedEvent, PlayerEvent.ItemPickupEvent, PlayerEvent.ItemSmeltedEvent, PlayerEvent.LoadFromFile, PlayerEvent.NameFormat, PlayerEvent.PlayerChangedDimensionEvent, PlayerEvent.PlayerChangeGameModeEvent, PlayerEvent.PlayerLoggedInEvent, PlayerEvent.PlayerLoggedOutEvent, PlayerEvent.PlayerRespawnEvent, PlayerEvent.SaveToFile, PlayerEvent.StartTracking, PlayerEvent.StopTracking, PlayerEvent.TabListNameFormat, PlayerEvent.Visibility
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
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
Deprecated.void
modifyVisibility
(double mod) Deprecated.Methods inherited from class net.minecraftforge.event.entity.player.PlayerEvent
getPlayer
Methods inherited from class net.minecraftforge.event.entity.living.LivingEvent
getEntityLiving
Methods inherited from class net.minecraftforge.event.entity.EntityEvent
getEntity
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getParentListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
-
Field Details
-
visibilityModifier
private double visibilityModifierDeprecated.
-
-
Constructor Details
-
Visibility
Deprecated.
-
-
Method Details
-
modifyVisibility
public void modifyVisibility(double mod) Deprecated.- Parameters:
mod
- Is multiplied with the current modifier
-
getVisibilityModifier
public double getVisibilityModifier()Deprecated.- Returns:
- The current modifier
-