cc-tweaked / CC-Tweaked

Just another ComputerCraft fork
https://tweaked.cc
919 stars 212 forks source link

"Cannot mount Rom" when runin with running with IntelliJ #158

Closed JakobDev closed 5 years ago

JakobDev commented 5 years ago

If I run CC-Tweaked with IntelliJ, I always get this Error: 2019-03-26_19 34 00 I setup the Mod with this Commands:

./gradlew --stacktrace setupDecompWorkspace --refresh-dependencies
./gradlew --stacktrace cleanIdea idea
SquidDev commented 5 years ago

Can you upload your run configuration and see if there's anything in the logs? I've never come across this issue, so I suspect it's an issue with your setup.

JakobDev commented 5 years ago

Here is the log

btw: The Error message is a liitle bit broken on Pocket Computers: 2019-03-26_20 27 42

SquidDev commented 5 years ago
[20:24:24] [main/ERROR] [FML]: Unable to read a class file correctly
java.lang.IllegalArgumentException: null
    at org.objectweb.asm.ClassReader.<init>(ClassReader.java:185) ~[asm-debug-all-5.2.jar:5.2]
    at org.objectweb.asm.ClassReader.<init>(ClassReader.java:168) ~[asm-debug-all-5.2.jar:5.2]
    at org.objectweb.asm.ClassReader.<init>(ClassReader.java:439) ~[asm-debug-all-5.2.jar:5.2]
[20:24:25] [main/WARN] [FML]: Zip file junit-platform-commons-1.1.0.jar failed to read properly, it will be ignored
net.minecraftforge.fml.common.LoaderException: java.lang.IllegalArgumentException

    at net.minecraftforge.fml.common.discovery.asm.ASMModParser.<init>(ASMModParser.java:63) ~[ASMModParser.class:?]
    at net.minecraftforge.fml.common.discovery.JarDiscoverer.findClassesASM(JarDiscoverer.java:102) ~[JarDiscoverer.class:?]
    at net.minecraftforge.fml.common.discovery.JarDiscoverer.discover(JarDiscoverer.java:77) [JarDiscoverer.class:?]

Well, these are somewhat concerning. A couple of things to try:

JakobDev commented 5 years ago

./gradlew runClient works!

Here's the run configuration: Screenshot at 2019-03-27 15:04:21

JakobDev commented 5 years ago

If I load a World that I created in a IntelliJ Instance with a gradlew runClient, I get this Error: Screenshot at 2019-03-27 15:34:10

SquidDev commented 5 years ago

Here's the run configuration:

On the "Use classpath of module" section, see if you can select cc-tweaked-1.12.2-main instead. If that doesn't work, then I'm at a loss.

If I load a World that I created in a IntelliJ Instance with a gradlew runClient, I get this Error:

Yeah, ForgeGradle/IntelliJ integration is a little broken so MCMultipart + Charset get injected into the wrong scope. It's OK to hit yes.

JakobDev commented 5 years ago

There is no cc-tweaked-1.12.2-main. There is only cc-tweaked-1.12.2.

SquidDev commented 5 years ago

Ahh, probably because you ran the idea task instead of importing directly. Really not sure what's going on then.

JakobDev commented 5 years ago

This two commands works perfect with the old CC. What commands do you suggest instead to make the code ready for IntelliJ?

SquidDev commented 5 years ago

Curious - nothing should have changed which'd cause file mounts to suddenly stop working. I Just use IntelliJ's built-in Gradle importing instead.

JakobDev commented 5 years ago

How do I run the mod, if I use the Gradle importer? "Minecraft Client" is not in the list.

SquidDev commented 5 years ago

You can use ./gradlew genIntellijRuns, or just create a new task like your screenshot above. See also the MinecraftForge docs.

JakobDev commented 5 years ago

That worked for me! Thanks!