ModsFinder

Suggestions API

by aratakileo

Suggestions API is a library for Minecraft text input fields, letting other mods attach completion suggestions to them.

FabricForgeNeoForgeQuiltClient-side onlyGNU Lesser General Public License v3.0 onlyOpen source1.20 – 1.20.4

What it does

Suggestions API gives mod developers a way to add suggestions to Minecraft's text input fields. Suggestions can be added statically or dynamically, and they can be produced synchronously or asynchronously from the text the user has typed. The library matches entered text against a pattern, including regular expressions, and offers suggestions between the nearest space to the left of the cursor and the cursor itself.

Four suggestion styles are provided ready-made: always shown, simple text with a default or custom showing condition, text with an icon to the left or right, and text suggestions that appear after the user begins entering text. Developers can change how suggestions are rendered, and the library exposes events for suggestion sessions and for a suggestion being selected. It also covers suggestions created outside the library, which can be replaced. The mod runs on client only, so servers do not need it.

Key features

  1. Static and dynamic suggestions

    Suggestions can be defined in advance or generated on the fly from the text entered into a field.

  2. Synchronous and asynchronous injection

    Two basic injector types add suggestions either directly or in the background, so slow lookups do not block typing.

  3. Pattern matching

    Suggestions can be triggered by a specified pattern, including regular expressions, and mapped with a custom condition lambda.

  4. Rendering and events

    Developers can change how each suggestion is drawn and react to suggestion sessions starting and suggestions being selected.

Compatibility

Latest build for each game version and loader.

1.20.41.0.6+fabric1.0.6+forge1.0.6+forge1.0.6+fabric
1.20.31.0.6+fabric1.0.6+forge1.0.6+forge1.0.6+fabric
1.20.21.0.6+fabric1.0.6+forge1.0.6+forge1.0.6+fabric
1.20.11.0.6+fabric1.0.6+forge1.0.6+forge1.0.6+fabric
1.201.0.6+fabric1.0.6+forge1.0.6+forge1.0.6+fabric
ReleaseBetaAlphaNot available

Only full game releases are shown. This mod publishes no snapshot builds.

Use cases

Command suggestions

A mod that adds chat commands can use the library to propose argument values as a player types them.

Custom text fields

Mods with their own input screens can attach suggestions to a field without building a completion system from scratch.

Who it’s for: Mod developers who want completion suggestions in Minecraft text fields without writing the matching and rendering code themselves. Players do not need to interact with the library directly.

Questions

Does Suggestions API need to be installed on servers?

No. Only the player's game needs it, and servers run without it.

Which loaders does Suggestions API support?

Files are published for Fabric, Forge, NeoForge and Quilt, covering 1.20 – 1.20.4.

Is Suggestions API open source?

Yes. It is released under the GNU Lesser General Public License v3.0 only, and the source code is public.

In the catalog

Suggestions API is one of 3,514 Library mods on ModsFinder, and one of 2,348 Library mods for Fabric. 13,907 mods support Minecraft 1.20.4.

More from aratakileo

All projects

Similar mods

What the author says

for which the library provides ready-made implementations in the form of: - always shown suggestion (texted suggestion with condition to always show it) - simple suggestion (texted suggestion with default or custom showing condition) - icon suggestion (texted suggestion with icon on the left or on the right with…
aratakileo, on the Modrinth page

Official listing

Owner
aratakileo
Published
2023-09-01
Updated on Modrinth
2024-02-21
Facts verified
2026-10-15

Tags