CJMinecraft01 / ForgeModBuilder

Build, setup, update and refresh your modding environment!
55 stars 12 forks source link

start new project doesn't work #17

Closed raphaeliG closed 6 years ago

raphaeliG commented 6 years ago

i tried to start a new mod project and it didnt work. then i updated my java and my gradle and it still didn't work...

the console log: Checking for updates at URL: https://raw.githubusercontent.com/CJMinecraft01/ForgeModBuilder/master/update.json No update found Creating a new project! Found download link: https://files.minecraftforge.net/maven/net/minecraftforge/forge/1.12.2-14.23.4.2705/forge-1.12.2-14.23.4.2705-mdk.zip Downloaded file to C:\Users\user\Desktop\temp.zip Extracting file to C:\Users\user\Desktop\Tutorial Mod Setting up build file! Loaded project: C:\Users\user\Desktop\Tutorial Mod, MC: 1.12.2, Forge: 14.23.4.2705, MCP: snapshot_20171003 Setting up project: C:\Users\user\Desktop\Tutorial Mod, MC: 1.12.2, Forge: 14.23.4.2705, MCP: snapshot_20171003 Setting editor to eclipse Ran gradlew command: gradlew setupDecompWorkspace eclipse

computer: lenovo thinkpad x220 windows 7 enterprise 64-bit intel i5-2540m cpu 2.6Hz 8GB of ram

raphaeliG commented 6 years ago

i fixed it by changing the gradle-wrapper.properties, i needed to change the distributionUrl. (.\gradle\wrapper\gradle-wrapper.properties) but now it gives me another error exception in thread "main" java.lang.NullPointerException at org.gradle.wrapper.BootStrapMainStarter.start<BootstrapMainStarter.java:34> at org.gradle.wrapper.WrapperExecutor.execute<WrapperExecutor.java:127> at org.gradle.wrapper.GradleWrapperMain.main<GradleWrapperMain.java:61>

please help me

CJMinecraft01 commented 6 years ago

Ok, so what I would recommend is a fresh install of gradle. Now what you could do is update the gradle for the project or gradle as a whole, it shouldn't matter. The command to update gradle for the project is gradlew wrapper --gradle-version=4.2 for the whole of gradle: gradle wrapper --gradle-version=4.2 They should update gradle. You could also just enter the gradle version you are currently on to do a fresh reinstall

raphaeliG commented 6 years ago

do i need to update the %Path% system variable aswell?

raphaeliG commented 6 years ago

and do i need to change the gradle-wrapper.properties?

CJMinecraft01 commented 6 years ago

No you shouldn't have to

raphaeliG commented 6 years ago

then it still doesn't work

CJMinecraft01 commented 6 years ago

Strange, try making a backup of the gradle folder and then deleting the old one. It should re download gradle

raphaeliG commented 6 years ago

which gradle? the one in the project folder or the one installed in c:/Gradle?

CJMinecraft01 commented 6 years ago

the one in c:/Gradle . Make a backup first

raphaeliG commented 6 years ago

It works now!

but it also gives me a new problem...

on recompileMC:

vlcsnap-2018-07-07-22h29m12s216

raphaeliG commented 6 years ago

please help

Fr1me commented 6 years ago

I'm not that familiar with the variables on windows 7 but what are your Path and possibly Java_Home variables set to?

raphaeliG commented 6 years ago

my path is set to the bin folder of the jdk. do i need a java home variable? what should i set it to? and if so, how come that modding tools like MCreator, which also uses the forge mdk, works perfectly fine on my computer?

Fr1me commented 6 years ago

Try putting your Java_Home to the jdk folder itself.

raphaeliG commented 6 years ago

trying it now... in the meantime, maybe i should downdate (like update but the opposite) my java 1.8?

raphaeliG commented 6 years ago

tried what you said(without what i said), still doesn't work `Checking for updates at URL: https://raw.githubusercontent.com/CJMinecraft01/ForgeModBuilder/master/update.json No update found Loaded project: C:\Users\user\Desktop\materiamod, MC: 1.12.2, Forge: 14.23.4.2729, MCP: snapshot_20171003 Setting up project: C:\Users\user\Desktop\materiamod, MC: 1.12.2, Forge: 14.23.4.2729, MCP: snapshot_20171003 Setting editor to eclipse Ran gradlew command: gradlew setupDecompWorkspace eclipse Starting a Gradle Daemon, 1 busy and 2 incompatible Daemons could not be reused, use --status for details

Configure project : This mapping 'snapshot_20171003' was designed for MC 1.12! Use at your own peril. ################################################# ForgeGradle 2.3-SNAPSHOT-ee3e3df
https://github.com/MinecraftForge/ForgeGradle
################################################# Powered by MCP
http://modcoderpack.com
by: Searge, ProfMobius, R4wk, ZeuX
Fesh0r, IngisKahn, bspkrs, LexManos
#################################################

Task :deobfCompileDummyTask Task :deobfProvidedDummyTask Task :getVersionJson Task :extractUserdev UP-TO-DATE Task :extractDependencyATs SKIPPED Task :extractMcpData SKIPPED Task :extractMcpMappings SKIPPED Task :genSrgs SKIPPED Task :downloadClient SKIPPED Task :downloadServer SKIPPED Task :splitServerJar SKIPPED Task :mergeJars SKIPPED Task :deobfMcSRG SKIPPED Task :decompileMc SKIPPED Task :fixMcSources SKIPPED Task :applySourcePatches SKIPPED Task :remapMcSources SKIPPED Task :recompileMc FAILED 5 actionable tasks: 4 executed, 1 up-to-date`

CJMinecraft01 commented 6 years ago

Open up gradle.properties, how much ram do you have allocated?

On Mon, 9 Jul 2018, 21:09 raphaeliG, notifications@github.com wrote:

tried what you said(without what i said), still doesn't work `Checking for updates at URL: https://raw.githubusercontent.com/CJMinecraft01/ForgeModBuilder/master/update.json No update found Loaded project: C:\Users\user\Desktop\materiamod, MC: 1.12.2, Forge: 14.23.4.2729, MCP: snapshot_20171003 Setting up project: C:\Users\user\Desktop\materiamod, MC: 1.12.2, Forge: 14.23.4.2729, MCP: snapshot_20171003 Setting editor to eclipse Ran gradlew command: gradlew setupDecompWorkspace eclipse Starting a Gradle Daemon, 1 busy and 2 incompatible Daemons could not be reused, use --status for details

Configure project : This mapping 'snapshot_20171003' was designed for MC 1.12! Use at your own peril. ################################################# ForgeGradle 2.3-SNAPSHOT-ee3e3df https://github.com/MinecraftForge/ForgeGradle ################################################# Powered by MCP http://modcoderpack.com by: Searge, ProfMobius, R4wk, ZeuX Fesh0r, IngisKahn, bspkrs, LexManos #################################################

Task :deobfCompileDummyTask Task :deobfProvidedDummyTask Task :getVersionJson Task :extractUserdev UP-TO-DATE Task :extractDependencyATs SKIPPED Task :extractMcpData SKIPPED Task :extractMcpMappings SKIPPED Task :genSrgs SKIPPED Task :downloadClient SKIPPED Task :downloadServer SKIPPED Task :splitServerJar SKIPPED Task :mergeJars SKIPPED Task :deobfMcSRG SKIPPED Task :decompileMc SKIPPED Task :fixMcSources SKIPPED Task :applySourcePatches SKIPPED Task :remapMcSources SKIPPED Task :recompileMc FAILED 5 actionable tasks: 4 executed, 1 up-to-date`

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/CJMinecraft01/ForgeModBuilder/issues/17#issuecomment-403604060, or mute the thread https://github.com/notifications/unsubscribe-auth/ANPggQhjZhz6fDW26DZcAWzO5GhfoODDks5uE7hjgaJpZM4VDk_Q .

raphaeliG commented 6 years ago

org.gradle.jvmargs=-Xmx3G

looks like 3 gigs of ram if I am correct

raphaeliG commented 6 years ago

and i have a total of 8 gigs, so that should be fine

CJMinecraft01 commented 6 years ago

Ok, try running using cmd in the project folder. Currently (and this is a know issue) FMB does not log any errors in the console

raphaeliG commented 6 years ago

tried... but the moment it fails the command prompt shuts down not letting me see what was the error. the previous screenshot I took was a lucky shot, and I can't take another one

raphaeliG commented 6 years ago

I even tried writing pause in the batch file, but it seems to ignore that

CJMinecraft01 commented 6 years ago

Try in the project folder, pressing SHIFT and right clicking and press open command prompt here (or powershell). If powershell then type cmd first and then try executing the command.

raphaeliG commented 6 years ago

Worked! it's a NullPointerException. But how do i fix it?

CJMinecraft01 commented 6 years ago

Ok, great. So try adding --stacktrace to the end of the command and see what it says

raphaeliG commented 6 years ago

done it, image

CJMinecraft01 commented 6 years ago

Can you show your build.gradle file please?

raphaeliG commented 6 years ago

sure

buildscript { repositories { jcenter() maven { url = "http://files.minecraftforge.net/maven" } } dependencies { classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT' } } apply plugin: 'net.minecraftforge.gradle.forge' //Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.

version = "1.0" group = "raphaeliG" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "materiamod"

sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly. compileJava { sourceCompatibility = targetCompatibility = '1.8' }

minecraft { version = "1.12.2-14.23.4.2729" 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 always work.
// simply re-run your setup task after changing the mappings to update your workspace.
mappings = "snapshot_20171003"
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.

}

dependencies { // you may put jars on which you depend on in ./libs // or you may define them like so.. //compile "some.group:artifact:version:classifier" //compile "some.group:artifact:version"

// real examples
//compile 'com.mod-buildcraft:buildcraft:6.0.8:dev'  // adds buildcraft to the dev env
//compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env

// the 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
//provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'

// the deobf configurations:  'deobfCompile' and 'deobfProvided' are the same as the normal compile and provided,
// except that these dependencies get remapped to your current MCP mappings
//deobfCompile 'com.mod-buildcraft:buildcraft:6.0.8:dev'
//deobfProvided 'com.mod-buildcraft:buildcraft:6.0.8:dev'

// for more info...
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
// http://www.gradle.org/docs/current/userguide/dependency_management.html

}

processResources { // this will ensure that this task is redone when the versions change. inputs.property "version", project.version inputs.property "mcversion", project.minecraft.version

// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
    include 'mcmod.info'

    // replace version and mcversion
    expand 'version':project.version, 'mcversion':project.minecraft.version
}

// copy everything else except the mcmod.info
from(sourceSets.main.resources.srcDirs) {
    exclude 'mcmod.info'
}

}

CJMinecraft01 commented 6 years ago

Try running gradlew clearCache and then run the previous command

raphaeliG commented 6 years ago

didn't work, but gradlew cleanCache did

CJMinecraft01 commented 6 years ago

Same issue?

raphaeliG commented 6 years ago

no, but now it freezes in downloadServer, or it just takes lonnnnng timmmeee

CJMinecraft01 commented 6 years ago

That's because we cleaned the cache. It should redownload forge gradle hopefully

raphaeliG commented 6 years ago

ok. btw, is there a chance that it's because i'm using a laptop? someone told that could be the case...

CJMinecraft01 commented 6 years ago

I highly doubt that. Just let the task finish. If it breaks again, let me know

raphaeliG commented 6 years ago

same problem again NullPointerException when doing the task recompileMC

CJMinecraft01 commented 6 years ago

Try creating a new project and see if the error happens again

raphaeliG commented 6 years ago

we're back to "couldn't determine java version from '10.0.1'"

CJMinecraft01 commented 6 years ago

What java version are you using?

raphaeliG commented 6 years ago

jdk? 10.0.1

On Tue, Jul 10, 2018 at 2:59 PM CJMinecraft notifications@github.com wrote:

What java version are you using?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/CJMinecraft01/ForgeModBuilder/issues/17#issuecomment-403797144, or mute the thread https://github.com/notifications/unsubscribe-auth/Am9odM3cav7N2iynqm5ykrcO09b_yMhMks5uFJcfgaJpZM4VDk_Q .

CJMinecraft01 commented 6 years ago

You need java 8 so a java 8 jdk

raphaeliG commented 6 years ago

thank you so much you can't even think to yourself how long was I looking for the solution to this. image but why doesn't java 10 work?

strikerrocker commented 6 years ago

Java 9 or above isnt supported by forge or mojang so with updated java there will be quite a no of errors in internals of both until they decide to take their time to update we cant use newer versions of java at all