侧边栏壁纸
  • 累计撰写 793 篇文章
  • 累计创建 1 个标签
  • 累计收到 1 条评论
标签搜索

目 录CONTENT

文章目录
MC

环境搭建

Dettan
2021-07-10 / 0 评论 / 0 点赞 / 201 阅读 / 634 字
温馨提示:
本文最后更新于 2022-07-23,若内容或图片失效,请留言反馈。部分素材来自网络,若不小心影响到您的利益,请联系我们删除。

先下载 mdk 这就是一个例子. 去掉点东西就能用

1.
./gradlew.bat setupDecompWorkspace
2.
eclipse >> gradlew.bat eclipse
3.
idea >> ./gradlew.bat idea genIntellijRuns
4.
启动的设置GradleStart为主类启动,main函数在主类里 . GradleStartServer 是服务器的启动主类.
5.
启动


PS C:\Users\liu\Desktop\MOD\myMod> ./gradlew.bat setupDecompWorkspace
To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/2.14/userguide/gradle_daemon.html.
Download https://files.minecraftforge.net/maven/net/minecraftforge/gradle/ForgeGradle/2.3-SNAPSHOT/ForgeGradle-2.3-20190904.022048-42.jar
This mapping 'snapshot_20171003' was designed for MC 1.12! Use at your own peril.
#################################################
ForgeGradle 2.3-SNAPSHOT-5ce6d6f3
https://github.com/MinecraftForge/ForgeGradle
#################################################
Powered by MCP
http://modcoderpack.com
by: Searge, ProfMobius, R4wk, ZeuX
Fesh0r, IngisKahn, bspkrs, LexManos
#################################################
:deobfCompileDummyTask
:deobfProvidedDummyTask
:getVersionJson
:extractUserdev UP-TO-DATE
:extractDependencyATs SKIPPED
:extractMcpData SKIPPED
:extractMcpMappings SKIPPED
:genSrgs SKIPPED
:downloadClient SKIPPED
:downloadServer SKIPPED
:splitServerJar SKIPPED
:mergeJars SKIPPED
:deobfMcSRG SKIPPED
:decompileMc SKIPPED
:fixMcSources
:applySourcePatches
:remapMcSources
:recompileMc SKIPPED
:extractNatives SKIPPED
:getAssetIndex UP-TO-DATE
:getAssets
Current status: 1121/1305 85%
:makeStart
:setupDecompWorkspace
BUILD SUCCESSFUL
Total time: 9 mins 13.895 secs
gradlew.bat eclipse
PS C:\Users\liu\Desktop\MOD\myMod> ./gradlew.bat idea genIntellijRuns
To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/2.14/userguide/gradle_daemon.html.
This mapping 'snapshot_20171003' was designed for MC 1.12! Use at your own peril.
#################################################
ForgeGradle 2.3-SNAPSHOT-5ce6d6f3
https://github.com/MinecraftForge/ForgeGradle
#################################################
Powered by MCP
http://modcoderpack.com
by: Searge, ProfMobius, R4wk, ZeuX
Fesh0r, IngisKahn, bspkrs, LexManos
#################################################
:deobfCompileDummyTask
:deobfProvidedDummyTask
:ideaModule
:ideaProject
:ideaWorkspace
:idea
:genIntellijRuns

BUILD SUCCESSFUL




老笔记上记得
JDK8(需翻墙):http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Eclipse可以在这里下载,网址是:http://www.eclipse.org/downloads/
首先我们要下载MDK,MDK的下载地址在这里:http://files.minecraftforge.net/
如果是用github上的代码重建环境,那么文件夹里没有elipse文件夹,在forge包里复制一个.
解压上一步下载的Forge文件夹并打开,shift右键打开shell窗口
键入命令    ./gradlew.bat setupDecompWorkspace       //配置环境
键入命令    ./gradlew.bat eclipse
打开安装好的eclipse,workspace 选择到forge文件夹里的Eclipse文件夹,然后启动,如果启动后workspace 里有一个已存的项目叫MDKExample 那就可以了,点击启动就会打开装有你开发的的MOD的MC了
如果上一步出问题就去 http://blog.hakugyokurou.net/?page_id=126
配置IDEA
配置IDEA首先要编辑build.gradle,在其中加入(如果不知道该加在哪的话...就加在最后吧!):
1
2
3
4
5
idea {
module {
inheritOutputDirs = true
}
}
然后在命令窗口中执行:
1
gradlew.bat idea genIntellijRuns
等它执行完毕后,打开IDEA,选Open,然后目录设为MDK目录.
gradlew build
gradlew runclient   //运行客户端
gradlew runserver
gradlew cleanEclipse
gradlew cleanIdea
0

评论区