Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Whenever I export my mod it goes into a jar file, as I would like it to be. But whenever I put it in my mods folder, my armor's model texture is missing. I would like to resolve this issue because when I release this mod I would like it to be as nice as possible. Thanks!

I can only assume you do not have these properly in your resources/assets folders? Can you post some code/screenshots of your references to these textures and the package hierarchy they are in?

I'll need help, and I'll give help. Just ask, you know I will!

The important thing is your build.gradle file.  That is what gradle uses to figure out what to put in the build, and also depends on your file organization.

 

What does your build.gradle file look like?  What does your asset directory structure look like?

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Normal setup is:

 

build.gradle
  src/
     main/
         java/  => code here
         resources/
             assets/
                {modid}/
                     lang/
                         en_US.lang
                     textures/
                         blocks/ => block textures
                         items/ => item textures
                         otherstuff/

here is something else to remember, when you run MCForge from eclipse on a windows platform (not sure about others) the textures and sounds are read directly from files so they are not case sensitive,

BUT, when you compile them into a jar or zip, they become case sensitive, so check that the code and filename are the same,

I found it best to have them all in lowercase, that way its easier to see if something is wrong , case wise

 

  • Author

Normal setup is:

 

build.gradle
  src/
     main/
         java/  => code here
         resources/
             assets/
                {modid}/
                     lang/
                         en_US.lang
                     textures/
                         blocks/ => block textures
                         items/ => item textures
                         otherstuff/

 

Yes it is setup like this

  • Author

The important thing is your build.gradle file.  That is what gradle uses to figure out what to put in the build, and also depends on your file organization.

 

What does your build.gradle file look like?  What does your asset directory structure look like?

I havent been able to use build.gradle, I have been using the file, export thing, whenever I use gradle my java files arent converted into class files. But here is my build.gradle

 

buildscript {

    repositories {

        mavenCentral()

        maven {

            name = "forge"

            url = "http://files.minecraftforge.net/maven"

        }

        maven {

            name = "sonatype"

            url = "https://oss.sonatype.org/content/repositories/snapshots/"

        }

    }

    dependencies {

        classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'

    }

}

 

apply plugin: 'forge'

 

version = "1.7.2-1.0"

group= "net.minecraftforge.InfiniCraft" // http://maven.apache.org/guides/mini/guide-naming-conventions.html

archivesBaseName = "infinicraft"

 

minecraft {

    version = "1.7.2-10.12.2.1121"

    assetDir = "eclipse/assets"

}

 

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

 

    // 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, thats not the mcmod.info

    from(sourceSets.main.resources.srcDirs) {

        exclude 'mcmod.info'

    }

}

 

 

 

 

 

  • Author

here is something else to remember, when you run MCForge from eclipse on a windows platform (not sure about others) the textures and sounds are read directly from files so they are not case sensitive,

BUT, when you compile them into a jar or zip, they become case sensitive, so check that the code and filename are the same,

I found it best to have them all in lowercase, that way its easier to see if something is wrong , case wise

This is most likely the error. Look at this image: http://imgur.com/pQw4AJf,Be5V7s0,llBVEbn,8vIYchx,StZraVe#3

 

Yes, but with the first ones they are all lower case yet it is still the same

 

I havent been able to use build.gradle, I have been using the file, export thing, whenever I use gradle my java files arent converted into class files. But here is my build.gradle

You need to do gradlew build.

Export from IDE won't obfuscate the mod, and Forge will be unable to read it.

  • Author

FishSauce

how do you run gradle?

 

I shift right click and run cmd at the folder and then I run gradlew build

  • Author

I havent been able to use build.gradle, I have been using the file, export thing, whenever I use gradle my java files arent converted into class files. But here is my build.gradle

You need to do gradlew build.

Export from IDE won't obfuscate the mod, and Forge will be unable to read it.

It has worked before, and when I use gradle it doesn't convert all the .java files to .class, only a few

  • Author

It has worked before, and when I use gradle it doesn't convert all the .java files to .class, only a few

Are all your source files in src/main/java? Where do you get the compiled jar from? Do you get any errors? This should not happen.

Yes, all my source files are in src/main/java. I get the jar from the libs folder. There are no errors.

  • Author

Then it should work...

OK i figured out that when I take everything out of the jar file and put it into a folder and run it, it does work. Yet when I make another zip file or a jar file and take the things from the folder and put it back in there it doesn't work.

  • Author

Run it? How do you try to run your compiled mod?

Just start the game with forge installed and the mod in the mods folder

  • 2 weeks later...

at this stage i have only 1 idea,

Zip the entire src folder , upload it somewhere, where we can access it, and post a link to the file

 

  • Author

at this stage i have only 1 idea,

Zip the entire src folder , upload it somewhere, where we can access it, and post a link to the file

thanks, but i fixed it

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.