摘要:
你想在你的游戏中拥有一个全知全能的人工智能神明吗?那么请下载这个模组,它需要配合 Player2 App 使用。
这也作为一个演示,展示如何使用 Player2 API 将 AI 聊天服务集成到 Minecraft 中。查看源代码 在这里。
重要提示:要使用此模组(无论是作为开发者还是用户),您必须保持 Player2 应用程序处于打开并运行状态。
这个模组做什么?
此模组允许从 Player2 应用程序中选择的当前角色充当“AI 神明”,可以在 Minecraft 游戏中执行命令并与用户聊天。
如果您只需要模组:
步骤 1
确保您已安装 Player2 应用程序。
步骤 2
安装 Forge。
步骤 3
在此处安装模组的最新版本。
步骤 5
运行 Player2 应用程序,然后打开 Minecraft。打开一个单人世界,角色应该会用一条消息向您打招呼。只需在聊天中输入内容,角色就会通过聊天消息、命令或两者兼有的方式回应。您还可以按 X 键与神明进行语音聊天。
开发环境设置:
步骤 1:
确保您已安装 Player2 应用程序。
步骤 2:
确保您已安装某些 JDK。在 Windows 上,我们使用 OpenJDK21 进行了测试。
步骤 3:
解压 ZIP 文件,然后导航到解压后的文件夹。
步骤 4:
取决于您希望使用的 IDE:
IntelliJ:
打开 IDEA 并导入项目。
选择您的 build.gradle 文件并让其导入。
运行以下命令:./gradlew genIntellijRuns
如有必要,在 IDEA 中刷新 Gradle 项目。
Eclipse:
运行以下命令:./gradlew genEclipseRuns
打开 Eclipse,导入 > 现有 Gradle 项目 > 选择文件夹,或者运行 gradlew eclipse 来生成项目。
如果在任何时间点您的 IDE 中缺少库,或者遇到了问题,您可以运行 gradlew --refresh-dependencies 来刷新本地缓存。运行 gradlew clean 以重置所有内容(这不会影响您的代码),然后重新开始该过程。
步骤 5:
在运行游戏之前,请确保 Player2 应用程序已打开。
步骤 6:
要在 IntelliJ 或 Eclipse 中运行游戏,打开 Gradle 选项卡,然后在 Tasks/forgegradle runs 下,应该有一个用于 runClient 的 gradle 选项。只需点击它,Minecraft 就应该会打开。
API 文档
一旦 Player2 应用程序正在运行,您可以通过在任何 Web 浏览器中打开 来找到文档。
映射名称:
默认情况下,MDK 配置为使用 Mojang 针对 Minecraft 代码库中的方法和字段的官方映射名称。这些名称受特定许可协议的约束。所有模组制作者都应了解此许可协议;如果您不同意,您可以在 build.gradle 中将您的映射名称更改为其他众包名称。有关最新许可文本,请参阅映射文件本身,或参考副本在这里:
其他资源:
Player2 / Elefant AI discord:
Forge 支持:
社区文档:
LexManos 的安装视频:
Forge 论坛: Forge Discord:
Summary:
Do you want an all-knowing AI god in your game? Then download this mod with Player2 App.
This also serves as a Demo of how to use the Player2 API to integrate AI chat services into Minecraft. View source code here.
Important Note: To use this mod (either as a developer or a user), you must have the Player2 app open and running.
What does this mod do?
This mod allows the currently selected character from the Player2 app to act as an "AI God" that can execute commands and chat to the user in the game Minecraft.
If you just want the mod:
Step 1
Make sure you have the Player2 app installed.
Step 2
Install Forge.
Step 3
Install the latest release of the mod here.
Step 5
Run the Player2 app, then open minecraft. Open a singleplayer world, and the character should greet you with a message. Simply type in chat, and the character will respond with chat messages, commands, or both. You can also press x to use voice chat with the god.
Development Setup:
Step 1:
Make sure you have the Player2 app installed.
Step 2:
Make sure you have some JDK installed. On Windows we tested with OpenJDK21.
Step 3:
Extract the ZIP file, then navigate to the extracted folder.
Step 4:
Depends on what IDE you wish to use:
IntelliJ:
Open IDEA, and import project.
Select your build.gradle file and have it import.
Run the following command: ./gradlew genIntellijRuns
Refresh the Gradle Project in IDEA if required.
Eclipse:
Run the following command: ./gradlew genEclipseRuns
Open Eclipse, Import > Existing Gradle Project > Select Folder or run gradlew eclipse to generate the project.
If at any point you are missing libraries in your IDE, or you've run into problems you can run gradlew --refresh-dependencies to refresh the local cache. gradlew clean to reset everything (this does not affect your code) and then start the process again.
Step 5:
Before running the game, make sure the Player2 app is open.
Step 6:
To run the game, either in IntelliJ or Eclipse, open up the Gradle tab, then under Tasks/forgegradle runs there should be a gradle option for runClient. Simply click that and minecraft should open.
API Docs
Once the Player2 app is running, the docs can be found by opening on any web browser.
Mapping Names:
By default, the MDK is configured to use the official mapping names from Mojang for methods and fields in the Minecraft codebase. These names are covered by a specific license. All modders should be aware of this license, if you do not agree with it you can change your mapping names to other crowdsourced names in your build.gradle. For the latest license text, refer to the mapping file itself, or the reference copy here:
Additional Resources:
Player2 / Elefant AI discord:
Forge supports:
Community Documentation:
LexManos' Install Video:
Forge Forums: Forge Discord:
评论 0
登录后参与评分
还没有评论,来抢沙发吧