Jump to content

Recommended Posts

Posted (edited)

Basically im making a stupid mistake but i just cant identify it because......im stupid. Anyway, im able to build my mod successfully but forge isnt reading it, there are two parts to this error: 

Spoiler

[16:45:11] [main/WARN]: Zip file afaoe-1.2.2.7.jar failed to read properly, it will be ignored
java.lang.NullPointerException: null
    at net.minecraftforge.fml.common.MetadataCollection.from(MetadataCollection.java:78) ~[MetadataCollection.class:?]
    at net.minecraftforge.fml.common.discovery.JarDiscoverer.discover(JarDiscoverer.java:58) [JarDiscoverer.class:?]
    at net.minecraftforge.fml.common.discovery.ContainerType.findMods(ContainerType.java:47) [ContainerType.class:?]
    at net.minecraftforge.fml.common.discovery.ModCandidate.explore(ModCandidate.java:74) [ModCandidate.class:?]
    at net.minecraftforge.fml.common.discovery.ModDiscoverer.identifyMods(ModDiscoverer.java:138) [ModDiscoverer.class:?]
    at net.minecraftforge.fml.common.Loader.identifyMods(Loader.java:401) [Loader.class:?]
    at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:541) [Loader.class:?]
    at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:231) [FMLClientHandler.class:?]
    at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:466) [bib.class:?]
    at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:377) [bib.class:?]
    at net.minecraft.client.main.Main.main(SourceFile:123) [Main.class:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_25]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_25]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_25]
    at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_25]
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]

and: 

Spoiler

[16:45:11] [main/INFO]: FML has found a non-mod file afaoe-1.2.2.7.jar in your mods directory. It will now be injected into your classpath. This could severe stability issues, it should be removed if possible.

The full log is here: https://pastebin.com/ZtafjmGL (short and to the point). 

 

Now my basic understanding of the log is that something is messed up in either my build.gradle or mcmod.info (i could be wrong in my interpretation). But ive gone over the files multiple times, and ive looked to make sure my modid in both those locations and my reference class are correct and matching. 

Im currently running forge-2555 which i know isnt the latest but all of the versions are matching (client, jar, gradle etc) so it should still work no? Here is my build.gradle:

Spoiler

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.2.2.7"
group = "com.varitekcibus.afaoe" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "afaoe"

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


minecraft {
    version = "1.12.2-14.23.1.2555"
    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'
    }
}
 

I just left all the comments in because i dont really care but sorry if its hard on the eyes. My mcmod.info looks like this:

Spoiler

[
{
  "modid": "afaoe",
  "name": "Amazing FoodStuffs and Other Essentials",
  "description": "Adds hundreds of base ingredients that can be used to make nearly a thousand different and fully custom foods that all do different things.",
  "version": "1.2.2.7",
  "mcversion": "1.12.1, 1.12.2",
  "url": "varitekcibus.com",
  "updateUrl": "",
  "authorList": ["Varitek"],
  "credits": "Pams Harvestcraft for inspiration.",
  "logoFile": "",
  "screenshots": [],
  "dependencies": []
}
]
 

And heres my github because why not add more information over less:https://github.com/Varitek3rulz3/AFAOE

If you need anything else just let me know, i know im just being dumb and i hope thats the case, the build is successful and everything is where its supposed to be i believe, i made a mod on 1.7 so some things have changed but making the mod on 1.12 hasnt been difficult, however ive never run into this issue before, ive browsed all the forums on multiple sites about this similar issue and have tried all sorts of things but i cant seem to crack it. I apologize that im not as good at this as some people but thanks for reading this and i would love any recommendations. 

Edited by VaritekCibus
grammar mistake
Posted

Ok so it looks like for now i have fixed my issue. For anyone else that might have this issue, I updated my forge to the latest version (not the recommended version), and i rebuilt the mod from the ground up in a new directory and path. I shouldve kept track at each stage to see what actually worked but i tried a bunch of things before trying again so i apologize but im not sure what specifically did it for me.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.