IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    [原]Minecraft源码分析(6) - forge环境配置

    qp120291570发表于 2016-09-29 22:20:40
    love 0
    OS Windows10 64bit


    1.Java 
    最好在1.8以上,这里用的jdk-8u71-windows-x64.exe,下载好之后直接双击安装,安装好之后命令行运行
    java -version



    2.gradle

    从官方网站获取最新的zip包
    http://www.gradle.org/
    2.将其解压并配置环境变量指向gralde目录 如

    %GRADLE_HOME%=E:\yourparh\gradle

    在path中设置bin目录
    %GRADLE_HOME%\bin;

    打开控制台,运行gradle -v ;配置成功



    3.forge mdk

    直接去官网下载http://files.minecraftforge.net/

    这里下载的稳定版forge-1.8-11.14.4.1563-mdk.zip


    终端进入解压后的文件夹

    命令行运行 gradlew setupDecompWorkspace
    等待...
    等待...
    等待...


    运行完事之后终端会显示 BUILD SUCCESSFUL.
    如果爆connection error之类的,就检查下网络,要么用代理。


    还有几种配置模式,具体区别如下,不翻译了


    Tip:
    If you do not care about seeing Minecraft's source code you can replace "setupDecompWorkspace" with one of the following:
    "setupDevWorkspace": Will patch, deobfusicated, and gather required assets to run minecraft, but will not generated human readable source code.
    "setupCIWorkspace": Same as Dev but will not download any assets. This is useful in build servers as it is the fastest because it does the least work.


    Tip:
    When using Decomp workspace, the Minecraft source code is NOT added to your workspace in a editable way. Minecraft is treated like a normal Library. Sources are there for documentation and research purposes and usually can be accessed under the 'referenced libraries' section of your IDE.



    4.IDE配置
    这里分Eclipse党和Intellij党。


    Eclipse党
    首先当然是下载eclipse,解压好。Version: Mars.1 Release (4.5.1)
    继续在刚才的终端运行 gradlew eclipse
    等待....
    等待...
    等待...
    BUILD SUCCESSFUL


    打开eclipse,workspace定位到forge文件夹下的eclipse文件夹,加载完成后是这样




    等右下角的进度条走完,直接RUN->Client
    起飞了。



    Intellij
    还是下载安装啊,ver 15.0.3


    继续在刚才的终端运行 gradlew idea
    等待....
    等待...
    等待...
    BUILD SUCCESSFUL



    打完收工。


沪ICP备19023445号-2号
友情链接