Interface IForgePlayer

All Known Implementing Classes:
AbstractClientPlayer, LocalPlayer, Player, RemotePlayer, ServerPlayer

public interface IForgePlayer
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    isCloseEnough(Entity entity, double dist)
    Utility check to see if the player is close enough to a target entity.
    private Player
     
  • Method Details

    • self

      private Player self()
    • isCloseEnough

      default boolean isCloseEnough(Entity entity, double dist)
      Utility check to see if the player is close enough to a target entity. Uses "eye-to-closest-corner" checks.
      Parameters:
      entity - The entity being checked against
      dist - The max distance allowed
      Returns:
      If the eye-to-center distance between this player and the passed entity is less than dist.
      Implementation Note:
      This method inflates the bounding box by the pick radius, which differs from vanilla. But vanilla doesn't use the pick radius, the only entity with > 0 is AbstractHurtingProjectile.