Interface Mob

    • Method Detail

      • setTarget

        void setTarget​(@Nullable
                       LivingEntity target)
        Instructs this Mob to set the specified LivingEntity as its target.

        Hostile creatures may attack their target, and friendly creatures may follow their target.

        Parameters:
        target - New LivingEntity to target, or null to clear the target
      • getTarget

        @Nullable
        LivingEntity getTarget()
        Gets the current target of this Mob
        Returns:
        Current target of this creature, or null if none exists