本帖最后由 zkm00323 于 2017-3-28 23:38 编辑
现在可以看到src/main/java里已经有了一个自带的mod范例我们可以按左上角的播放键来执行以下游戏可以看到mod列表里已经有了一个Example Mod!
我不是很专业,不过是个大一新生,java菜鸡,但是从小有颗做游戏的心!好不废话了我们进入正题
1.安装jdk←点击
2.下载eclipse for Java ←点击
3.下载forge src ←点击
(可能有人下载不了我就直接给文件了,不保证是最新版本)
forge-1.11-13.19.1.2189-mdk.zip
(242.19 KB, 下载次数: 425)
4.解压eclipse和forge src
5.在 modding 1.11文件夾 中 Shift+右键 选择 在此处打开命令窗口
输入: gradlew setupDecompWorkspace && gradlew eclipse
如果出现找不到JAVA_HOME的提示
BUILD SUCCESSFUL!
6.用eclipse打开刚刚构建的环境
完成!
现在可以看到src/main/java里已经有了一个自带的mod范例我们可以按左上角的播放键来执行以下游戏可以看到mod列表里已经有了一个Example Mod!
下一章我们来构建基本mod框架
下一篇:基本mod框架
为什么图片看不了
gradlew setupDecompWorkspace && gradlew eclipse命令处,窗口一直在打点. . . . . ,是不是哪一步做错了
Sky丶NPC 发表于 2017-2-6 09:52
gradlew setupDecompWorkspace && gradlew eclipse命令处,窗口一直在打点. . . . . ,是不是哪一步做错了 ...
并没有做错,这是正常现象,如果一个点都不跳反倒需要考虑一下网络问题了。。。
FAILURE: Build failed with an exception.
* What went wrong:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at https://docs.gradle.org/2.14/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 3145728KB object heap
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* What went wrong:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at https://docs.gradle.org/2.14/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 3145728KB object heap
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
求助!楼主能不能帮忙看看是哪一部出错了?
还有lz能不能帮忙看下为何我打开eclipse之后是这个?


苦力伯伯 发表于 2017-2-14 21:20
FAILURE: Build failed with an exception.
* What went wrong:
你这个是java分配不到足够的内存。需要3G
Could not reserve enough space for 3145728KB object heap
aiwdsj 发表于 2017-2-14 22:11
你这个是java分配不到足够的内存。需要3G
Could not reserve enough space for 3145728KB object heap
...
谢大神
src下不了TAT
孤独鸣远 发表于 2017-3-28 19:19
src下不了TAT
forge网站能打开但是下载mdk的时候那个网站打不开了,就算打开了好像也调到别的网页里面了,adfoc.us
孤独鸣远 发表于 2017-3-28 19:06
forge网站能打开但是下载mdk的时候那个网站打不开了,就算打开了好像也调到别的网页里面了,adfoc.us ...
adfoc.us是个下载网站的中转网站,会让你看一下广告,过5秒后点击右上角即可,
这样是为了让forge团队获得一点收入来源
zkm00323 发表于 2017-3-28 20:02
adfoc.us是个下载网站的中转网站,会让你看一下广告,过5秒后点击右上角即可,
这样是为了让forge团队获得一 ...
可是我没有翻墙呀
孤独鸣远 发表于 2017-3-28 21:06
可是我没有翻墙呀
而且右上角不是关闭吗......?
哎对我看其他帖子里还需要弄jdk来着还有其他的东西这些用不用......?
孤独鸣远 发表于 2017-3-28 22:18
哎对我看其他帖子里还需要弄jdk来着还有其他的东西这些用不用......?
恩...事实上是要的,因为jdk在我电脑里尘封了许久以至于我都忘记他的存在了
D:\modding 1.11>gradlew setupDecompWorkspace && gradlew eclipse
To honour the JVM settings for this build a new JVM will be forked. Please consi
der using the daemon: https://docs.gradle.org/2.14/userguide/gradle_daemon.html.
Download http://files.minecraftforge.net/ ... orge/gradle/ForgeGr
adle/2.2-SNAPSHOT/ForgeGradle-2.2-20170331.025320-32.jar
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'modding 1.11'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not download ForgeGradle.jar (net.minecraftforge.gradle:ForgeGradle:2
.2-SNAPSHOT)
> Could not close resource 'http://files.minecraftforge.net/maven/net/mine
craftforge/gradle/ForgeGradle/2.2-SNAPSHOT/ForgeGradle-2.2-20170331.025320-32.ja
r'.
> Premature end of Content-Length delimited message body (expected: 139
62714; received: 1132266
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
BUILD FAILED
Total time: 6 mins 12.814 secs
To honour the JVM settings for this build a new JVM will be forked. Please consi
der using the daemon: https://docs.gradle.org/2.14/userguide/gradle_daemon.html.
Download http://files.minecraftforge.net/ ... orge/gradle/ForgeGr
adle/2.2-SNAPSHOT/ForgeGradle-2.2-20170331.025320-32.jar
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'modding 1.11'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not download ForgeGradle.jar (net.minecraftforge.gradle:ForgeGradle:2
.2-SNAPSHOT)
> Could not close resource 'http://files.minecraftforge.net/maven/net/mine
craftforge/gradle/ForgeGradle/2.2-SNAPSHOT/ForgeGradle-2.2-20170331.025320-32.ja
r'.
> Premature end of Content-Length delimited message body (expected: 139
62714; received: 1981686
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
BUILD FAILED
Total time: 8 mins 47.137 secs
楼主,这是什么问题?求救
楼主,这是怎么回事?请教
:decompileMc
Error occurred during initialization of VM
Could not reserve enough space for 3145728KB object heap
:decompileMc FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':decompileMc'.
> Process 'command 'C:\Program Files\Java\jdk1.8.0_91\bin\java.exe'' finished wi
th non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
BUILD FAILED
:decompileMc
Error occurred during initialization of VM
Could not reserve enough space for 3145728KB object heap
:decompileMc FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':decompileMc'.
> Process 'command 'C:\Program Files\Java\jdk1.8.0_91\bin\java.exe'' finished wi
th non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
BUILD FAILED
IMENDERDRAGON 发表于 2017-5-20 22:25
楼主,这是怎么回事?请教
:decompileMc
Error occurred during initialization of VM
也许你的jdk有问题,下载个新版本的jdk试试~
zkm00323 发表于 2017-5-21 08:31
也许你的jdk有问题,下载个新版本的jdk试试~
我换了但是问题依旧
本帖最后由 zkm00323 于 2017-5-21 20:45 编辑
你下载了新版本的jdk有跟新JAVAHOME路径吗?
IMENDERDRAGON 发表于 2017-5-21 20:39
我换了但是问题依旧
你下载了新版本的jdk有跟新JAVAHOME路径吗?
zkm00323 发表于 2017-5-21 20:43
你下载了新版本的jdk有跟新JAVAHOME路径吗?
有啊,并且我也用指令调试过,是成功的
IMENDERDRAGON 发表于 2017-5-21 20:46
有啊,并且我也用指令调试过,是成功的
你有像我呢样改gradlew.bat,还是直接就能用了?
zkm00323 发表于 2017-5-21 20:50
你有像我呢样改gradlew.bat,还是直接就能用了?
直接就能用
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'forge-1.7.10-10.13.4.1558-1.7.10-src'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not download artifact 'org.apache.httpcomponents:httpcore:4.3.2:httpcore.jar'
> Failed to download resource 'http://repo1.maven.org/maven2/org/apache/httpcomponents/httpcore/4.3.2/httpcore-4.3.2.jar'.
> Premature end of Content-Length delimited message body (expected: 282269; received: 21998
* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.
BUILD FAILED
Total time: 53.488 secs
* What went wrong:
A problem occurred configuring root project 'forge-1.7.10-10.13.4.1558-1.7.10-src'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not download artifact 'org.apache.httpcomponents:httpcore:4.3.2:httpcore.jar'
> Failed to download resource 'http://repo1.maven.org/maven2/org/apache/httpcomponents/httpcore/4.3.2/httpcore-4.3.2.jar'.
> Premature end of Content-Length delimited message body (expected: 282269; received: 21998
* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.
BUILD FAILED
Total time: 53.488 secs
你忘记说了
要VPN或者http代理
否则速度慢如狗
要VPN或者http代理
否则速度慢如狗
补充一个1.11.2的实例吧
里面有1.11.2的基本的mod框架
block方块的例子
tileEntity的简单例子
item物品的例子
blockState的例子
还有一个线缆的例子,特性接近IC2的线缆,可以互相连接,还展示了碰撞箱的使用方式
兼容多人模式
https://github.com/rikka0w0/MinecraftModBasicDemo
里面有1.11.2的基本的mod框架
block方块的例子
tileEntity的简单例子
item物品的例子
blockState的例子
还有一个线缆的例子,特性接近IC2的线缆,可以互相连接,还展示了碰撞箱的使用方式
兼容多人模式
https://github.com/rikka0w0/MinecraftModBasicDemo
金坷居士 发表于 2017-6-1 16:45
补充一个1.11.2的实例吧
里面有1.11.2的基本的mod框架
block方块的例子
好东西,感谢分享!
本帖最后由 猜猜谁是谁 于 2017-6-11 19:23 编辑
为什么运行范例时有错误?@zkm0032描述 资源 路径 位置 类型
项目“MDKExample”缺少必需的库:”D:\forge-1.11.2-13.20.0.2228-mdk\unresolved dependency - net.minecraftforge forgeBin 1.11.2-13.20.0.2228” MDKExample 构建路径 构建路径问题
为什么运行范例时有错误?@zkm0032描述 资源 路径 位置 类型
项目“MDKExample”缺少必需的库:”D:\forge-1.11.2-13.20.0.2228-mdk\unresolved dependency - net.minecraftforge forgeBin 1.11.2-13.20.0.2228” MDKExample 构建路径 构建路径问题
猜猜谁是谁 发表于 2017-6-11 19:09
为什么运行范例时有错误?@zkm0032描述 资源 路径 位置 类型
项目“MDKExample”缺少必需的库 ...
环境可能没构建完成吧,有build susses吗?
aiwdsj 发表于 2017-2-14 22:11
你这个是java分配不到足够的内存。需要3G
Could not reserve enough space for 3145728KB object heap
...
那怎么分配3G
Download http://files.minecraftforge.net/maven/net/minecraftforge/gradle/ForgeGradle/2.3-SNAPSHOT/ForgeGradle-2.3-20170630.061630-6.jar
> Configuring > 0/1 projects > root project > 187 KB/13.32 MB downloaded
下到187KB就不下了。。。怎么办。重新来一次吗
> Configuring > 0/1 projects > root project > 187 KB/13.32 MB downloaded
下到187KB就不下了。。。怎么办。重新来一次吗
白泽大屌 发表于 2017-7-4 15:32
那怎么分配3G
64位操作系统,空闲内存足够多基本上就没问题
大佬我的提示这个
所在位置 行:1 字符: 30
+ gradlew setupDecompWorkspace && gradlew eclipse
+ ~~
标记“&&”不是此版本中的有效语句分隔符。
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : InvalidEndOfLine
求帮忙
所在位置 行:1 字符: 30
+ gradlew setupDecompWorkspace && gradlew eclipse
+ ~~
标记“&&”不是此版本中的有效语句分隔符。
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : InvalidEndOfLine
求帮忙
输入gradlew setupDecompWorkspace && gradlew eclipse后出现Downloading https://services.gradle.org/distributions/gradle-2.14-bin.zip然后后面都是在打点不停正常吗
楼主我的配置成功了****************************
Powered By MCP:
http://modcoderpack.com/
Searge, ProfMobius, Fesh0r,
R4wk, ZeuX, IngisKahn, bspkrs
MCP Data version : unknown
****************************
:eclipseClasspath
:eclipseJdt
:eclipseProject
:eclipse
BUILD SUCCESSFUL
但是运行时出现了
错误: 找不到或无法加载主类 GradleStartServer
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
怎么回事?
Powered By MCP:
http://modcoderpack.com/
Searge, ProfMobius, Fesh0r,
R4wk, ZeuX, IngisKahn, bspkrs
MCP Data version : unknown
****************************
:eclipseClasspath
:eclipseJdt
:eclipseProject
:eclipse
BUILD SUCCESSFUL
但是运行时出现了
错误: 找不到或无法加载主类 GradleStartServer
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
怎么回事?
spider853 发表于 2017-8-19 09:59
楼主我的配置成功了****************************
Powered By MCP:
http://modcoderpack.com/
我把forgeSRC里的eclipse文件夹里的eula.txt里的eula改成了true,解决了
aiwdsj 发表于 2017-7-6 23:48
64位操作系统,空闲内存足够多基本上就没问题
32位咋办
求1.7.10的MDK
楼主你太好了,我源码下不了你给了我下载地址!万分感谢!
本帖最后由 我叫帅@@哥 于 2017-10-9 19:17 编辑
进eclipse后提示:
进eclipse后提示:

谢了,楼主。
楼主,出现这种情况咋整?
****************************
Powered By MCP:
http://modcoderpack.com/
Searge, ProfMobius, Fesh0r,
R4wk, ZeuX, IngisKahn, bspkrs
MCP Data version : unknown
****************************
:extractMcpData UP-TO-DATE
:getVersionJson
:extractUserDev UP-TO-DATE
:genSrgs SKIPPED
:extractNatives UP-TO-DATE
:getAssetsIndex
:getAssets
:makeStart
[ant:javac] 警告: [options] 未与 -source 1.6 一起设置引导类路径
[ant:javac] 1 个警告
:downloadMcpTools SKIPPED
:downloadClient SKIPPED
> Building 50% > :downloadServer
****************************
Powered By MCP:
http://modcoderpack.com/
Searge, ProfMobius, Fesh0r,
R4wk, ZeuX, IngisKahn, bspkrs
MCP Data version : unknown
****************************
:extractMcpData UP-TO-DATE
:getVersionJson
:extractUserDev UP-TO-DATE
:genSrgs SKIPPED
:extractNatives UP-TO-DATE
:getAssetsIndex
:getAssets
:makeStart
[ant:javac] 警告: [options] 未与 -source 1.6 一起设置引导类路径
[ant:javac] 1 个警告
:downloadMcpTools SKIPPED
:downloadClient SKIPPED
> Building 50% > :downloadServer
能发一下1.12或1.12.2的版本吗,我翻不了墙