環境構築 (1.12.2)

概要

MODを開発するための環境を整えます。Windows 10で確認しているので、MacやLinuxでは異なる部分があります。複数のMODを開発する時は、Forgeの手順3から繰り返してください。

2020年12月8日、IntelliJ IDEA 2020.3の更新に伴い、記事を書き換えました。以前の情報は「前提知識」「環境構築 1」「環境構築 2 (1.12.2)」をご覧ください。

動作確認

2020年12月8日

  • Windows 10 Home 20H2 (64 bit)
  • IntelliJ IDEA 2020.3
  • AdoptOpenJDK (HotSpot) 1.8.0_275
  • Minecraft 1.12.2
  • Forge 14.23.5.2854

手順

前提

Minecraft: Java Editionを公式サイトで購入してください。

MODを開発し配布する際は、MinecraftのEULAに従う必要があります。Minecraftのコードの公開禁止や商用利用に関する制限などが含まれているので、必ず自分で確認してください。

MODの開発は自己責任で行ってください。この講座により生じたいかなる損害についても、TNT Moddersは一切責任を負いません。

IntelliJ IDEA

  1. ダウンロードページから「コミュニティ」をダウンロードしてください。
  2. ダウンロードしたインストーラを実行し、デフォルト設定のまま画面に従ってインストールしてください。
  3. IntelliJ IDEAを起動し、タイトル画面で「New Project」を選択してください。
  4. 「Project SDK」から「Download JDK」を選択してください。
  5. 「Version」に「1.8」、「Vendor」に「Eclipse Temurin (AdoptOpenJDK HotSpot)」を指定し、「Download」を押してください。
  6. 「Project SDK」に「adopt-openjdk-1.8」が選択されていることを確認し、「Cancel」を押してください。

Forge

  1. ダウンロードページから1.12.2を選択し、「Download Recommended」の「Mdk」を押してください。
  2. 「AdFoc.us」という広告ページに移動し、5秒待つと右上に「SKIP」というボタンが出るので、これをクリックしてダウンロードしてください。下の方の「ダウンロード」などのボタンは広告です。
  3. ダウンロードしたzipファイルを解凍してください。日本語の入っていない場所がよいでしょう。今回は例としてC:/Modding/AluminiumModを使用します。今後、build.gradleのパスがC:/Modding/AluminiumMod/build.gradleであるとします。
  4. IntelliJ IDEAを起動して「Open」からC:/Modding/AluminiumModを選択します。自動で読み込みが始まるので、右下の進捗表示が完了するまで待ってください。
  5. ファイアウォールの警告が出た場合は、プライベートネットワークでのアクセスを許可してください。
  6. 10分以上待つと読み込みが終わります。読み込みに失敗したら「Build」のTool Windowにエラーが表示されます。
  7. 画面右側のTool Window Barにある「Gradle」を選択し、GradleのTool Windowを開いてください。1
  8. AluminiumMod > Tasks > fg_runsと階層を下りて「genIntellijRuns」をダブルクリックすると、実行構成が自動で作成されます。「BUILD SUCCESSFUL」の表示を確認してください。
  9. Gradle Tool Window左上の同期ボタン(Reload All Gradle Projects)を押してください。
  10. 画面右上の「AluminiumMod [genIntellijRuns]」などと表示されている実行構成選択ボタンを押して「runClient」を選択してください。
  11. 実行ボタンを押して、Minecraftが起動することを確認してください。

IntelliJ IDEAのスクリーンショット

Example Modの削除

  1. AluminiumMod/src/main/java/にあるcom.example.examplemodを削除してください。中にはコードの例が入っています。
  2. IntelliJ IDEAのProject Tool Windowで手順1を実行した場合、com.exampleが残るので削除してください。
  3. AluminiumMod/src/main/javaを右クリックし、New > Packageからcom.tntmodders.tutorialパッケージを作成してください。実際にMODを作るときは自分が保有するドメインを使います。ない場合は自分の名前など、他のプログラムと被らないものを使ってください。2com.tntmoddersをあなたのMODのパッケージとして使わないでください。
  4. com.tntmodders.tutorialを右クリックし、New > Java ClassからAluminiumModを作成してください。
  5. AluminiumMod/src/main/resources/mcmod.infoを削除してください。MODの情報を登録するファイルですが、この開発講座では使いません。
  6. AluminiumMod/にあるCREDITS.txtLICENSE.txt、2つのLICENSE-Paulscode ….txtREADME.txtを削除してください。Forgeの説明文書です。

build.gradleの編集

デバッグ環境でリソースが読み込まれない問題を回避するため、build.gradleの末尾に以下のコードを追加してください。詳しくはこちらをご覧ください。

copy {
    delete {
        delete "$buildDir/classes/java/main"
    }
    into "$buildDir/classes/java/main"
    from sourceSets.main.resources
}

画像編集ソフト

16×16ピクセルの画像をピクセル単位で編集でき、RGBA各チャンネル8 bitの色情報を透過PNGファイルとして保存できるソフトを用意してください。リソースパックの作り方などで調べると適したソフトが紹介されていると思います。

凪浜は「paint.net」の無料版を使っています。TomKateはPhotoshop Proを使っていますが、もっと軽いピクセル絵用のソフトのほうがいいと思います。

再インストールの手順

エラーが出た際などに正しく再インストールするための手順を説明します。

Forge

  1. C:/Modding/AluminiumModを削除してください。
  2. Forgeの手順3からもう一度行ってください。

IntelliJ IDEA

  1. スタートメニューなどからIntelliJ IDEAのアンインストールを選択してください。
  2. 「Please confirm if you would like to delete the caches and settings:」の枠内にある2つのチェックボックスにチェックを入れてください。
  3. %APPDATA%/JetBrains/%LOCALAPPDATA%/JetBrains/に何か残っていたら削除してください。
  4. 削除が終わったら通常のインストールと同じなので、IntelliJ IDEAの手順2からもう一度行ってください。

AdoptOpenJDK

デフォルトでは%USERPROFILE%/.jdks/にインストールされます。この記事の方法では環境変数の設定などは行わないので、このディレクトリを削除するだけです。

リンク

Pleiades

IntelliJ IDEAを日本語化するツールです。使いたい方は、公式ページの解説に従ってインストールしてください。

ただし、日本語化による不具合の発生や翻訳の更新による混乱を避けるため、できるなら英語のまま使うことをおすすめします。この開発講座ではIntelliJ IDEAの操作や表示の説明を英語版に準拠して行います。


次:アイテムの追加

  1. Tool Window Barが表示されていない場合、画面左下隅の四角いアイコンをクリックすると表示されます。 
  2. オファレンMODはtntmodders.comを取得する前に開発を始めたので、nahama.ofalenmodをパッケージ名にしています。 

24件のコメント

  1. 羽卒山風

    Forgeの11番まで行なったのですが、Minecraftの読み込み画面が表示された後、すぐ閉じてしまいます。
    AluminiumMod/.gradleとユーザー/.gradleを削除し、Reload All Gradle Projectsを試しもしましたが、うまくいきませんでした。
    どうすればよいのでしょうか。
    以下はクラッシュレポートの全文です。

    ---- Minecraft Crash Report ----
    // Hey, that tickles! Hehehe!

    Time: 9/30/23 7:42 PM
    Description: There was a severe problem during mod loading that has caused the game to fail

    net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from Forge Mod Loader (FML)
    Caused by: java.lang.NullPointerException
    at net.minecraftforge.fml.common.network.NetworkRegistry.newChannel(NetworkRegistry.java:207)
    at net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.registerChannel(FMLNetworkHandler.java:185)
    at net.minecraftforge.fml.common.FMLContainer.modConstruction(FMLContainer.java:92)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
    at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
    at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
    at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
    at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
    at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
    at com.google.common.eventbus.EventBus.post(EventBus.java:217)
    at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:219)
    at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:197)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
    at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
    at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
    at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
    at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
    at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
    at com.google.common.eventbus.EventBus.post(EventBus.java:217)
    at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:136)
    at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:595)
    at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:232)
    at net.minecraft.client.Minecraft.init(Minecraft.java:467)
    at net.minecraft.client.Minecraft.run(Minecraft.java:378)
    at net.minecraft.client.main.Main.main(SourceFile:123)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at net.minecraftforge.legacydev.Main.start(Main.java:86)
    at net.minecraftforge.legacydev.MainClient.main(MainClient.java:29)

    A detailed walkthrough of the error, its code path and all known details is as follows:

    -- System Details --
    Details:
    Minecraft Version: 1.12.2
    Operating System: Windows 11 (amd64) version 10.0
    Java Version: 1.8.0_382, Temurin
    Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Temurin
    Memory: 648708480 bytes (618 MB) / 822083584 bytes (784 MB) up to 3767533568 bytes (3593 MB)
    JVM Flags: 0 total;
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    FML: MCP 9.42 Powered by Forge 14.23.5.2859 5 mods loaded, 5 mods active
    States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored

    | State | ID | Version | Source | Signature | |:----- |:---------- |:------------ |:----------------------------------------------------------- |:--------- | | LC | minecraft | 1.12.2 | minecraft.jar | None | | LC | mcp | 9.42 | minecraft.jar | None | | LE | FML | 8.0.99.99 | forge-1.12.2-14.23.5.2859_mapped_snapshot_20171003-1.12.jar | None | | L | forge | 14.23.5.2859 | forge-1.12.2-14.23.5.2859_mapped_snapshot_20171003-1.12.jar | None | | L | examplemod | 1.0 | main | None | Loaded coremods (and transformers): GL info: ' Vendor: 'Intel' Version: '4.6.0 - Build 31.0.101.4575' Renderer: 'Intel(R) UHD Graphics 770'

  2. おれっち

    IntelliJ IDEAでファイルを開いた時点でエラーを吐きます

    Could not find net.minecraftforge:forge:1.12.2-14.23.5.2859_mapped_snapshot_20171003-1.12.
    Required by:
    project :

    Possible solution:
    - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

    Could not find net.minecraftforge:forge:1.12.2-14.23.5.2859_mapped_snapshot_20171003-1.12.
    Searched in the following locations:
    - https://maven.minecraftforge.net/net/minecraftforge/forge/1.12.2-14.23.5.2859_mapped_snapshot_20171003-1.12/forge-1.12.2-14.23.5.2859_mapped_snapshot_20171003-1.12.pom
    - https://maven.minecraftforge.net/net/minecraftforge/forge/1.12.2-14.23.5.2859_mapped_snapshot_20171003-1.12/forge-1.12.2-14.23.5.2859_mapped_snapshot_20171003-1.12.jar
    - file:/C:/Users/nishi/.gradle/caches/forge_gradle/bundeled_repo/net/minecraftforge/forge/1.12.2-14.23.5.2859_mapped_snapshot_20171003-1.12/forge-1.12.2-14.23.5.2859_mapped_snapshot_20171003-1.12.pom
    - file:/C:/Users/nishi/.gradle/caches/forge_gradle/bundeled_repo/net/minecraftforge/forge/1.12.2-14.23.5.2859_mapped_snapshot_20171003-1.12/forge-1.12.2-14.23.5.2859_mapped_snapshot_20171003-1.12.jar
    - https://libraries.minecraft.net/net/minecraftforge/forge/1.12.2-14.23.5.2859_mapped_snapshot_20171003-1.12/forge-1.12.2-14.23.5.2859_mapped_snapshot_20171003-1.12.jar
    - https://repo.maven.apache.org/maven2/net/minecraftforge/forge/1.12.2-14.23.5.2859_mapped_snapshot_20171003-1.12/forge-1.12.2-14.23.5.2859_mapped_snapshot_20171003-1.12.pom
    - https://repo.maven.apache.org/maven2/net/minecraftforge/forge/1.12.2-14.23.5.2859_mapped_snapshot_20171003-1.12/forge-1.12.2-14.23.5.2859_mapped_snapshot_20171003-1.12.jar
    Required by:
    project :

    Possible solution:
    - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

    です。
    案の定実行はできません。どうすればいいのでしょうか。。

    • 赤砂蛇 凪浜

      net.minecraftforge:forge:1.12.2-14.23.5.2859_mapped_snapshot_20171003-1.12はForge Gradleにより自動生成されるはずの依存先です。

      IntelliJ IDEAを閉じてからAluminiumMod/.gradleユーザー/.gradleを削除し、再度開いてみてください。解決しなければ、記事の手順に沿って最初からやり直してみてください。

  3. ほっずー

    11番までいったのですがマインクラフトが起動しません。

    19:10:31: Executing 'genIntellijRuns'...

    Configure project :
    New Dep: net.minecraftforge:forge:1.12.2-14.23.5.2860_mapped_snapshot_20171003-1.12

    Task :downloadMcpConfig
    Task :extractSrg UP-TO-DATE
    Task :createSrgToMcp UP-TO-DATE
    Task :downloadMCMeta UP-TO-DATE
    Task :downloadAssets
    Task :extractNatives UP-TO-DATE
    Task :makeSrcDirs
    Task :prepareRuns
    Task :genIntellijRuns

    Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
    Use '--warning-mode all' to show the individual deprecation warnings.
    See https://docs.gradle.org/4.9/userguide/command_line_interface.html#sec:command_line_warnings

    BUILD SUCCESSFUL in 2s
    8 actionable tasks: 4 executed, 4 up-to-date
    19:10:34: Execution finished 'genIntellijRuns'.

    こうでるのですが起動しません。どうすればいいでしょうか。

    • 赤砂蛇 凪浜

      記載されているログはForgeの手順8の「genIntellijRuns」のものだと思います。ログを見る限り、手順8は成功しているようです。

      手順10で「runClient」が選択肢にないなら、手順9に加えてIntelliJ IDEAやパソコン本体の再起動を試してください。

      手順11で「runClient」を指定して実行ボタンを押せているなら、Minecraftの読み込み画面が一瞬でも表示されたかどうかと、「runClient」の実行ログをお知らせください。

      いずれにしても、記事の手順に沿って始めからやり直すと解決する場合もあると思います。

  4. modのファイルを開いたのですが、"Tasks"の中に"fg_runs"が見つからず、"forgegradle"の中に、"genlntelliiRuns"はあったのですが、起動させると以下のエラーが出ました,どうすればいいのでしょうか
    Caused by: groovy.lang.MissingMethodException: No sign

    • 赤砂蛇 凪浜

      Forge Gradleが正常に機能していないようです。Forgeについて最新のRecommendedかLatestのバージョンを使っていることを確認してください。

      また、記事の手順に完全にしたがって環境構築をやり直してみたり、直前のコメントのようにGradleのキャッシュを削除したりしてみてください。

      解決しない場合は、エラー欄の表示について全文をお知らせください。

  5. Forgeの手順11番の所でマイクラは一応起動するのですが、Modの読み込み中にクラッシュしてしまい、下はその時のクラッシュレポートです。

    Description: There was a severe problem during mod loading that has caused the game to fail

    net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from Forge Mod Loader (FML)

    • 赤砂蛇 凪浜

      Forgeの手順11の時点では、ForgeとExampleModが読み込まれるはずです。Minecraftのウィンドウが出て読み込み画面が表示された後、タイトル画面が表示される前にクラッシュするということでしょうか。

      記事の手順に完全にしたがって、環境構築をやり直してみてください。解決しない場合は、原因を特定するため、クラッシュレポートの全文をお知らせください。

      • 返信ありがとうございます。
        Minecraftのウィンドウが出て読み込み画面が表示されて、モッドの読み込みが3/5の所でクラッシュしてしまいます。下はクラッシュレポートの全文です。
        ---- Minecraft Crash Report ----
        // There are four lights!

        Time: 2/22/22 6:27 PM
        Description: There was a severe problem during mod loading that has caused the game to fail

        net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from Forge Mod Loader (FML)
        Caused by: java.lang.NullPointerException
        at net.minecraftforge.fml.common.network.NetworkRegistry.newChannel(NetworkRegistry.java:207)
        at net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.registerChannel(FMLNetworkHandler.java:185)
        at net.minecraftforge.fml.common.FMLContainer.modConstruction(FMLContainer.java:92)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
        at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
        at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
        at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
        at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
        at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
        at com.google.common.eventbus.EventBus.post(EventBus.java:217)
        at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:219)
        at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:197)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
        at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
        at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
        at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
        at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
        at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
        at com.google.common.eventbus.EventBus.post(EventBus.java:217)
        at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:136)
        at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:595)
        at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:232)
        at net.minecraft.client.Minecraft.init(Minecraft.java:467)
        at net.minecraft.client.Minecraft.run(Minecraft.java:378)
        at net.minecraft.client.main.Main.main(SourceFile:123)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
        at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at net.minecraftforge.legacydev.Main.start(Main.java:86)
        at net.minecraftforge.legacydev.MainClient.main(MainClient.java:29)

        A detailed walkthrough of the error, its code path and all known details is as follows:

        -- System Details --
        Details:
        Minecraft Version: 1.12.2
        Operating System: Windows 10 (amd64) version 10.0
        Java Version: 1.8.0_321, Oracle Corporation
        Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
        Memory: 447006104 bytes (426 MB) / 649592832 bytes (619 MB) up to 1886912512 bytes (1799 MB)
        JVM Flags: 0 total;
        IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
        FML: MCP 9.42 Powered by Forge 14.23.5.2859 5 mods loaded, 5 mods active
        States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored

        | State | ID | Version | Source | Signature | |:----- |:---------- |:------------ |:----------------------------------------------------------- |:--------- | | LC | minecraft | 1.12.2 | minecraft.jar | None | | LC | mcp | 9.42 | minecraft.jar | None | | LE | FML | 8.0.99.99 | forge-1.12.2-14.23.5.2859_mapped_snapshot_20171003-1.12.jar | None | | L | forge | 14.23.5.2859 | forge-1.12.2-14.23.5.2859_mapped_snapshot_20171003-1.12.jar | None | | L | examplemod | 1.0 | main | None | Loaded coremods (and transformers): GL info: ' Vendor: 'Intel' Version: '4.3.0 - Build 20.19.15.5171' Renderer: 'Intel(R) HD Graphics 4400'

        • 赤砂蛇 凪浜

          現象は理解しましたが、こちらでは再現されず、正常に環境構築できました。

          JDKがOracleのものになっているようなので、Project Structure > Project > SDKから1.8のEclipse Temurin (AdoptOpenJDK HotSpot)にしてください。

          また、IntelliJ IDEAを閉じてからTitaniumMod/.gradleユーザー/.gradleを削除し、再度開いてみてください。その後、「Reload All Gradle Projects」も試してください。

          解決しなかった場合は、デバッグ情報を使って原因を分析します。クラッシュレポートのスタックトレースは、NetworkRegistryの207行目でNullPointerExceptionが発生したことを示しています。ここはForge Mod Loaderの内部処理なので、通常なら例外は出ないはずです。

          まず、NetworkRegistry.java開き、207行目がchannels.get(side).put(name,channel);となっていることを確認してください。次に、207行目と208行目にブレークポイントを置いたうえでデバッグ実行してください。207行目で処理が中断されたらchannelsの状態をコピーし、再開します。208行目で中断される前にクラッシュすることを確認してください。

          上記の手順が完了したらchannelsの状態を、途中でうまくいかなかったら詳しい状況をお知らせください。

          • TitaniumMod/.gradle と ユーザー/.gradleを削除したら無事起動し、Modが読み込まれました。
            本当にありがとうございます。とても助かりました!

  6. Intel IDEAの5番で、VendorのリストにAdoptOpenJDK (HotSpot)というものが表示されないのですがどのようにすればよろしいでしょうか

    • 赤砂蛇 凪浜

      AdoptOpenJDK (HotSpot)はプロジェクトがEclipse Foundationへ移譲されたため、Eclipse Temurinに名前が変わりました。IntelliJ IDEAでは「Eclipse Temurin (AdoptOpenJDK HotSpot)」と表示されます。記事を修正しました。

  7. Nougat3c

    手順4の時点でエラー吐きまくってて方法を探ってたら、
    gradle.propertiesのorg.gradle.jvmargsの部分のorg.を消したら
    解消しました。

  8. forgeの11番の実行でつまづいています
    実行を押してもマイクラが立ち上がりません
    プログラミング初心者なのでcrash_reportsを見ても原因が分からないのでご教授願います
    下記にコピペします

    ---- Minecraft Crash Report ----
    // Why did you do that?

    Time: 12/17/21 1:58 PM
    Description: Initializing game

    java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer;
    at net.minecraft.client.Minecraft.readImageToBuffer(Minecraft.java:841)
    at net.minecraft.client.Minecraft.setWindowIcon(Minecraft.java:680)
    at net.minecraft.client.Minecraft.init(Minecraft.java:456)
    at net.minecraft.client.Minecraft.run(Minecraft.java:378)
    at net.minecraft.client.main.Main.main(Main.java:118)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at net.minecraftforge.legacydev.Main.start(Main.java:86)
    at net.minecraftforge.legacydev.MainClient.main(MainClient.java:29)

    A detailed walkthrough of the error, its code path and all known details is as follows:

    -- Head --
    Thread: Client thread
    Stacktrace:
    at net.minecraft.client.Minecraft.readImageToBuffer(Minecraft.java:841)
    at net.minecraft.client.Minecraft.setWindowIcon(Minecraft.java:680)
    at net.minecraft.client.Minecraft.init(Minecraft.java:456)

    -- Initialization --
    Details:
    Stacktrace:
    at net.minecraft.client.Minecraft.run(Minecraft.java:378)
    at net.minecraft.client.main.Main.main(Main.java:118)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at net.minecraftforge.legacydev.Main.start(Main.java:86)
    at net.minecraftforge.legacydev.MainClient.main(MainClient.java:29)

    -- System Details --
    Details:
    Minecraft Version: 1.12.2
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 1.8.0_261, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 243443528 bytes (232 MB) / 692584448 bytes (660 MB) up to 7621050368 bytes (7268 MB)
    JVM Flags: 0 total;
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    FML:
    Loaded coremods (and transformers):
    Launched Version: ${MC_VERSION}
    LWJGL: 2.9.4
    OpenGL: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread.
    GL Caps:
    Using VBOs: Yes
    Is Modded: Definitely; Client brand changed to 'fml,forge'
    Type: Client (map_client.txt)
    Resource Packs:
    Current Language: ~~ERROR~~ NullPointerException: null
    Profiler Position: N/A (disabled)
    CPU:

    それと参考になるか分かりませんが、1.16などほかのページも参考にさせていただいたのですが自分の環境にはrun_dataが生成されていません

    • 赤砂蛇 凪浜

      Forgeの最新版(14.23.5.2859以降)を使っていることを確認してください。また、JDKがOracleのものになっているようなので、Project Structure > Project > SDKから1.8のEclipse Temurin (AdoptOpenJDK (HotSpot))にしてください。

      runDataは1.12.2では生成されないので、問題ありません。

  9. forgeの11番の場所でrunClientをおすと
    Caused by: java.lang.IllegalArgumentException
    というエラーが出てきます。ちなみにマイクらは開けました。

    • 赤砂蛇 凪浜

      動作に支障があるようでしたら、エラーの全文(Stacktrace)と詳しい状況(この記事と異なる手順をしていないか、など)をお知らせください。

  10. 参考にさせていただきました。
    当方の環境ではそのままではForgeの4の段階でファイルが見つからないエラーが多発したのですが、mavenリポジトリの参照先のURLをhttpsからhttpにするとうまくいきました。

horumon へ返信するコメントをキャンセル

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください