iT邦幫忙

第 11 屆 iThome 鐵人賽

DAY 28
1
Software Development

[Minecraft - 當個創世神] 從玩遊戲到設計遊戲系列 第 28

[Day28] 載入其他模組

寫到這裡的時候,發現距離萬聖節越來越近了...於是就在想,要不要來弄一點萬聖節的氣氛到目前的模組內呢?

也許某一天,你跟我一樣在Minecraft Mod模組列表上面找尋有趣模組的時候,也想要下載下來,然後應用到自己的模組內,看看實際效果是如何。那麼,我們今天就來說說如何快速地載入其他模組吧!

  1. 下載模組檔案。你可以到我上面說的Minecraft Mod模組列表尋找有趣的模組,或是從其他網站下載。我這裡以Just Enough Items為例來說明:
    • 點選Files => View All
      https://ithelp.ithome.com.tw/upload/images/20191013/20115823oYYoWGPCSg.png
    • 由於我們模組是使用Minecraft 1.8來開發,因此請到約25頁的地方,下載jei_1.8.9-2.28.5.172.jar這個檔案 (其實其他的1.8.9版本應該也可以使用)
      https://ithelp.ithome.com.tw/upload/images/20191013/20115823KYnhsu0bAd.png
  2. 回到我們的IDE,打開build.gradle檔案,這裡因為下載的模組用的1.8.9是穩定版本,因此將我們的版本也改成1.8.9:
    // For those who want the bleeding edge
    buildscript {
        repositories {
            jcenter()
            maven {
                name = "forge"
                url = "http://files.minecraftforge.net/maven"
            }
        }
        dependencies {
             classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
        }
    }
    apply plugin: 'net.minecraftforge.gradle.forge'
    
    // for people who want stable
    //plugins {
    //    id "net.minecraftforge.gradle.forge" version "2.0.2"
    //}
    
    minecraft {
        version = "1.8.9-11.15.1.2318-1.8.9"
        runDir = "run"
    
        // the mappings can be changed at any time, and must be in the following format.
        // snapshot_YYYYMMDD   snapshot are built nightly.
        // stable_#            stables are built at the discretion of the MCP team.
        // Use non-default mappings at your own risk. they may not allways work.
        // simply re-run your setup task after changing the mappings to update your workspace.
        mappings = "stable_20"
        // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
    }
    
  3. 接著,到你的{PROJECT}\run目錄下,先建立一個mods目錄,然後將剛剛下載的jar檔移動到這個目錄下:
    https://ithelp.ithome.com.tw/upload/images/20191013/20115823kxsF8VQlqX.png
  4. 以上都沒有問題後,直接透過我們一般進入遊戲的方式啟動。在Mods頁面應該會看到載入的模組:
    https://ithelp.ithome.com.tw/upload/images/20191013/20115823XMzyU9UwwN.png
  5. 這個模組可以提供所有物品的製造與合成配方表,也支援快速查詢,在實際遊戲中也蠻實用的。有興趣的人也可以看看作者的[GitHub原始碼]喔(https://www.curseforge.com/minecraft/mc-mods/jei)!

https://ithelp.ithome.com.tw/upload/images/20191013/201158235dYjpTCay0.png


上一篇
[Day27] 來玩玩實體AI吧 (下)
下一篇
[Day29] Trick or treat!
系列文
[Minecraft - 當個創世神] 從玩遊戲到設計遊戲30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言