|
建议 API (Suggestions API)Github |相关wiki |源站链接支持: fabric , forge , neoforge , quilt建议 API 是用于处理 Minecraft 建议的库。它允许您添加建议并可以更改它们的渲染方式。使用此库,您可以静态或动态地添加建议。
哪些模组使用建议 API?
以下模组使用建议 API:
-
- https://modrinth.com/mod/jime]JIME
入门指南
将以下内容合并到您的代码中。下面是适用于 Fabric 或 Quit 的示例。如果您正在开发 Forge 或 Neoforge,请将 `fabric` 替换为 `forge`(从建议 API v1.0.4 开始适用此方式)。
build.gradle
groovyrepositories {maven {url = \"https://api.modrinth.com/maven\"}}
dependencies {modImplementation \"maven.modrinth:suggestions-api:1.0.6+fabric\"}
build.gradle.kts
groovyrepositories {maven(\"https://api.modrinth.com/maven\")}
dependencies {modImplementation(\"maven.modrinth\", \"suggestions-api\", \"1.0.6+fabric\")}
快速文档
快速文档包含了该库的基本信息。
嵌入式建议有哪些类型?
`Suggestion` 接口位于 `io.github.aratakileo.suggestionsapi.suggestion`。
该库有两种内置类型的建议。以下是它们初始化的函数:
- Suggestion.simple(...) - 简单的(仅文本)
- Suggestion.withIcon(...) - 带图标的(将在左侧渲染)
... (以下省略)
截图:
https://i.sodamc.com/modrinth/0t6KoxhFlc.jpg?x-oss-process=style/forge2]
来自Modrinth所有游戏版本1.201.20.11.20.21.20.31.20.4所有类型forgeneoforgefabricquiltSuggestions API 1.0.6+1.20-1.20.4-forgesuggestions-api-1.0.6+1.20-1.20.4-forge.jar下载1.0.6+forge#Releasesuggestions-api-1.0.6+1.20-1.20.4-forge-sources.jar下载1.0.6+forge#ReleaseCritical bug fix展开版本: 1.0.6+forge支持游戏: 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4类型:ForgeNeoForgeRelease下载次数: 278Suggestions API 1.0.6+1.20-1.20.4-fabricsuggestions-api-1.0.6+1.20-1.20.4-fabric.jar下载1.0.6+fabric#Releasesuggestions-api-1.0.6+1.20-1.20.4-fabric-sources.jar下载1.0.6+fabric#ReleaseCritical bug fix展开版本: 1.0.6+fabric支持游戏: 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4类型:FabricQuiltRelease下载次数: 687Suggestions API 1.0.5+1.20-1.20.4-forgesuggestions-api-1.0.5+1.20-1.20.4-forge.jar下载1.0.5+forge#Releasesuggestions-api-1.0.5+1.20-1.20.4-forge-sources.jar下载1.0.5+forge#Release## What\'s Changed* Fix freeze when typing certain commands [#37](https://github.com/aratakileo/emogg/issues/37) [#3](https://github.com/aratakileo/suggestions-api/pull/3)[[Full Changelog v1.0.4...v1.0.5]](https://github.com/aratakileo/suggestions-api/compare/v1.0.4...v1.0.5)展开版本: 1.0.5+forge支持游戏: 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4类型:ForgeNeoForgeRelease下载次数: 86Suggestions API 1.0.5+1.20-1.20.4-fabricsuggestions-api-1.0.5+1.20-1.20.4-fabric.jar下载1.0.5+fabric#Releasesuggestions-api-1.0.5+1.20-1.20.4-fabric-sources.jar下载1.0.5+fabric#Release## What\'s Changed* Fix freeze when typing certain commands [#37](https://github.com/aratakileo/emogg/issues/37) [#3](https://github.com/aratakileo/suggestions-api/pull/3)[[Full Changelog v1.0.4...v1.0.5]](https://github.com/aratakileo/suggestions-api/compare/v1.0.4...v1.0.5)展开版本: 1.0.5+fabric支持游戏: 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4类型:FabricQuiltRelease下载次数: 100Suggestions API 1.0.4+1.20-1.20.4-forgesuggestions-api-1.0.4+1.20-1.20.4-forge.jar下载1.0.4+forge#Releasesuggestions-api-1.0.4+1.20-1.20.4-forge-sources.jar下载1.0.4+forge#Release- port to `Forge` and `Neoforge`展开版本: 1.0.4+forge支持游戏: 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4类型:ForgeNeoForgeRelease下载次数: 123Suggestions API 1.0.4+1.20-1.20.4suggestions-api-1.0.4+1.20-1.20.4.jar下载1.0.4+fabric#Releasesuggestions-api-1.0.4+1.20-1.20.4-sources.jar下载1.0.4+fabric#Release- extended documentation- fixed a Minecraft bug related to duplicate invocation of injectors- now, inside the injectors associated with entering text into the input field in the method responsible for generating new suggestions, a `StringContainer` is passed as an argument, which contains more detailed information about the current context (full text from the input field, cursor position, whether a command is being entered, etc.)- now, by default, you can add suggestions regardless of the context (whether the player is currently entering a command or not)- implicit replacement of other suggestions is now prohibited. Instead, it is allowed to replace suggestions added outside of the Suggestions API using `ReplacementInjector`- the core has been rebuilt**Full Changelog**: https://github.com/aratakileo/suggestions-api/compare/v1.0.3...v1.0.4展开版本: 1.0.4+fabric支持游戏: 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4类型:FabricQuiltRelease下载次数: 179Suggestions API 1.0.3+1.20-1.20.4suggestions-api-1.0.3+1.20-1.20.4.jar下载1.0.3#Releasesuggestions-api-1.0.3+1.20.x-sources.jar下载1.0.3#Release- new parameter `IconSuggestion#isIconOnLeft`- new Injector `InjectorListener` that let listen events: onSessionInited (by `InjectorListener#onSessionInited(...)`), onSuggestionSelected (by `InjectorListener#onSuggestionSelected(...)`)- move `SuggestionsAPI#registerSuggestionsInjector(...)` to `SuggestionsAPI#registerInjector(...)`- move `SuggestionsAPI#addResourceDependedSuggestionsContainer(...)` to `SuggestionsAPI#addResourceDependedContainer(...)`- code structure has been refactored**Full Changelog**: https://github.com/aratakileo/suggestions-api/compare/v1.0.2...v1.0.3展开版本: 1.0.3支持游戏: 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4类型:FabricQuiltRelease下载次数: 165Suggestions API 1.0.2+1.20-1.20.1suggestions-api-1.0.2+1.20.x.jar下载1.0.2#Releasesuggestions-api-1.0.2+1.20.x-sources.jar下载1.0.2#Release- multiplayer crash fix [#1](https://github.com/aratakileo/suggestions-api/pull/1)- refactored from `SuggestionsAPI#registerResourceDependedInjector` to `SuggestionsAPI#addResourceDependedSuggestionsContainer`- now, by default, the mechanism for ignoring nested suggestions is enabled for each injector- other small changes展开版本: 1.0.2支持游戏: 1.20, 1.20.1类型:FabricQuiltRelease下载次数: 102Suggestions API 1.0.1+1.20-1.20.1suggestions-api-1.0.1+1.20.x.jar下载1.0.1#Releasesuggestions-api-1.0.1+1.20.x-sources.jar下载1.0.1#ReleaseRedesigned interface for asynchronous injector. All the logic of asynchrony has been moved from it to another place展开版本: 1.0.1支持游戏: 1.20, 1.20.1类型:FabricQuiltRelease下载次数: 142Suggestions API 1.0.0+1.20-1.20.1suggestions-api-1.0.0+1.20.x.jar下载1.0.0#Releasesuggestions-api-1.0.0+1.20.x-sources.jar下载1.0.0#ReleaseFirst release展开版本: 1.0.0支持游戏: 1.20, 1.20.1类型:FabricQuiltRelease下载次数: 132全部版本
markdown_parsed
文章类型:收录
layui.use([\'form\'], function(){
var form = layui.form;
});
建议 API |
楼主
2025-8-10 19:30:33
回复(0)
收起回复
|