接口 IForgePlayer

所有已知实现类:
AbstractClientPlayer, LocalPlayer, Player, RemotePlayer, ServerPlayer

public interface IForgePlayer
  • 方法概要

    修饰符和类型
    方法
    说明
    default boolean
    isCloseEnough(Entity entity, double dist)
    Utility check to see if the player is close enough to a target entity.
    private Player
     
  • 方法详细资料

    • 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.
      参数:
      entity - The entity being checked against
      dist - The max distance allowed
      返回:
      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.