zh_cn:tutorial:datagen_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
zh_cn:tutorial:datagen_setup [2024/04/15 03:10] – [手动启用数据生成] 更新,同步en solidblockzh_cn:tutorial:datagen_setup [2025/03/25 00:42] (current) – [IDE 实现(可选)] removed the section solidblock
Line 23: Line 23:
 fabricApi { fabricApi {
     configureDataGeneration()     configureDataGeneration()
 +}
 +</code>
 +
 +如果你使用的是 1.21.4 以上的版本,请将上述代码的 ''fabricApi'' 部分改为以下内容:
 +<code groovy>
 +fabricApi {
 +    configureDataGeneration() {
 +        client = true
 +    }
 } }
 </code> </code>
Line 91: Line 100:
 ''src/main'' 中应该会有个叫做 ''generated'' 的新文件夹。目前它会是空的,但我们生成数据(例如进度)之后,这些文件就会被保存。 ''src/main'' 中应该会有个叫做 ''generated'' 的新文件夹。目前它会是空的,但我们生成数据(例如进度)之后,这些文件就会被保存。
  
-==== IDE 实现(可选) ==== 
-  
-由于我们不会总是开启终端,因此我们可以在 ''**Intellij IDEA**'' 中设置一个配置,通过下拉菜单运行命令。 
- 
-首先打开''**运行/调试配置**''菜单,要打开它,你可以打开“运行”按钮旁的下拉菜单,点击''**编辑配置..**''选项,也可以连续按两次 ''**Shift**'' 并在弹出的窗口中输入 ''**Edit Configuration**'' 
- 
-然后点击 ''**'+'**'' 按钮,搜索 ''**gradle**'' 并选择。 
- 
-在 ''**运行**'' 输入框中,输入 ''**runDatagen**''。点击 ''**确定**'',然后你就可以直接运行配置而不需要打开终端了。 
  
 ====== 添加提供器 ====== ====== 添加提供器 ======
zh_cn/tutorial/datagen_setup.1713150602.txt.gz · Last modified: 2024/04/15 03:10 by solidblock