EntityUtil
Utility class for entity-related calculations, primarily visibility checks.
This class provides methods to determine if an entity is within a player's field of view or render distance, optimizing client-side rendering performance.
Since
2.0.0
Functions
Link copied to clipboard
open fun canSee(@NotNull player: @NotNull PlatformLocation, @NotNull target: @NotNull PlatformLocation): Boolean
Checks if a player can see a target entity based on sight tracing configuration.
Link copied to clipboard
Calculates the entity model view radius based on the server's view distance.
Link copied to clipboard
open fun isCustomNameVisible(@NotNull player: @NotNull PlatformLocation, @NotNull target: @NotNull PlatformLocation): Boolean
Checks if a target entity's custom name is visible to a player.
Link copied to clipboard
open fun isInPoint(@NotNull player: @NotNull PlatformLocation, @NotNull target: @NotNull PlatformLocation): Boolean
Checks if a target entity is directly in the player's crosshair (point of view).
Link copied to clipboard
Calculates the render distance in blocks based on the server's view distance.