User Tools

Site Tools


zh_cn:tutorial:setup

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
zh_cn:tutorial:setup [2023/08/10 01:05] – [java.lang.ClassNotFoundException: net.fabricmc.loader.impl.launch.knot.KnotClient / java.lang.TypeNotPresentException: Type net/minecraft/util/Identifier not present / java.lang.RuntimeException: Minecraft game provider couldn't locate the game! The game solidblockzh_cn:tutorial:setup [2024/03/14 04:19] – [手动步骤] solidblock
Line 24: Line 24:
 运行 Gradle 任务 ''genSources''(生成源文件),如果你的 IDE 不集成 Gradle 支持的话则需要在控制台/终端/命令提示符中输入 ''gradlew genSources''(在 Linux 或 macOS 上则是 ''./gradlew genSources'' 运行 Gradle 任务 ''genSources''(生成源文件),如果你的 IDE 不集成 Gradle 支持的话则需要在控制台/终端/命令提示符中输入 ''gradlew genSources''(在 Linux 或 macOS 上则是 ''./gradlew genSources''
  
-如有需要,可以在 ''gradle.properties'' 中设置镜像源。镜像源可能有时不可用,或者内容更新滞后,因此如需暂时禁镜像下载,可暂时将相关内容注释掉即可。+如有需要,可以在 ''gradle.properties'' 中设置镜像源。镜像源可能有时不可用,或者内容更新滞后,如需使官方源,可暂时将相关内容注释掉即可。BMCLAPI 镜像缓慢时,可使用官方源,或参考[[https://mirrors.cernet.edu.cn/list/bmclapi|校园网联合镜像站]]
  
 <code properties> <code properties>
Line 48: Line 48:
     - 在 Gradle 页面里打开“Gradle 设置(Gradle Settings)”     - 在 Gradle 页面里打开“Gradle 设置(Gradle Settings)”
     - 将“使用此工具构建和运行(Build and run using)”和“使用此工具运行测试(Run tests using)”选项改成“IntelliJ IDEA”。     - 将“使用此工具构建和运行(Build and run using)”和“使用此工具运行测试(Run tests using)”选项改成“IntelliJ IDEA”。
-    - 进入 文件(File)-> 项目结构...(Project Structure...)-> 项目(Project)然后将模块编译输出路径(Project compiler output)改成 ''$PROJECT_DIR$/out'' 
  
 不幸的是,目前还不能给“使用此工具构建和运行”和“使用此工具运行测试”设置一个全 IDE 内的默认值,所以这些每创建一个新项目都得重复上述步骤。 不幸的是,目前还不能给“使用此工具构建和运行”和“使用此工具运行测试”设置一个全 IDE 内的默认值,所以这些每创建一个新项目都得重复上述步骤。
Line 55: Line 54:
  
 如果你使用 IntelliJ IDEA,你可以使用 [[https://plugins.jetbrains.com/plugin/8327|MinecraftDev 插件]]。该插件支持自动生成 Fabric 项目以及一些与 Mixin 有关的功能,如检查、生成访问器(accessor)和影子(shadow)字段、复制 Mixin 目标参考(JVM 描述符)。你可以在文件(File) → 设置(Settings) → 插件(Plugins)中打开内部插件浏览器,找到并安装这个插件,只需要在搜索框里搜索“Minecraft”,选择第一个结果安装即可。  如果你使用 IntelliJ IDEA,你可以使用 [[https://plugins.jetbrains.com/plugin/8327|MinecraftDev 插件]]。该插件支持自动生成 Fabric 项目以及一些与 Mixin 有关的功能,如检查、生成访问器(accessor)和影子(shadow)字段、复制 Mixin 目标参考(JVM 描述符)。你可以在文件(File) → 设置(Settings) → 插件(Plugins)中打开内部插件浏览器,找到并安装这个插件,只需要在搜索框里搜索“Minecraft”,选择第一个结果安装即可。 
 +
 +**注**:MCDev 插件中的模板会直接使用 loom 的最新不稳定版本,请小心使用。
  
 === Eclipse === === Eclipse ===
zh_cn/tutorial/setup.txt · Last modified: 2024/04/15 00:36 by solidblock