FishSauce Posted September 16, 2014 Posted September 16, 2014 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! Quote
strumshot Posted September 16, 2014 Posted September 16, 2014 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? Quote I'll need help, and I'll give help. Just ask, you know I will!
jabelar Posted September 16, 2014 Posted September 16, 2014 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? Quote Check out my tutorials here: http://jabelarminecraft.blogspot.com/
sequituri Posted September 16, 2014 Posted September 16, 2014 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/ Quote -S- (if I helped, please click Thank and applaud) http://6upnqa.dm2301.livefilestore.com/y2mtf-vG7Tqq1TiiVpIm53KWj7294NDPoHfSHHb4PzZiMAUfRCfK0UY0MwOu7Q3zTBNVTKqWjr2-xgBfFRpQT5p-QivtvknPpoABMNUw9br9WuZcBFkjePhnAbW500gVm-P/sequiturian.png[/img]
Ewe Loon Posted September 16, 2014 Posted September 16, 2014 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 Quote
FishSauce Posted September 16, 2014 Author Posted September 16, 2014 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? http://imgur.com/pQw4AJf,Be5V7s0,llBVEbn,8vIYchx,StZraVe#0 Quote
FishSauce Posted September 16, 2014 Author Posted September 16, 2014 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 Quote
FishSauce Posted September 16, 2014 Author Posted September 16, 2014 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' } } Quote
FishSauce Posted September 16, 2014 Author Posted September 16, 2014 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 Quote
GotoLink Posted September 16, 2014 Posted September 16, 2014 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. Quote
FishSauce Posted September 16, 2014 Author Posted September 16, 2014 FishSauce how do you run gradle? I shift right click and run cmd at the folder and then I run gradlew build Quote
FishSauce Posted September 16, 2014 Author Posted September 16, 2014 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 Quote
FishSauce Posted September 16, 2014 Author Posted September 16, 2014 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. Quote
FishSauce Posted September 16, 2014 Author Posted September 16, 2014 Then it should work... Well it doesn't... Quote
FishSauce Posted September 17, 2014 Author Posted September 17, 2014 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. Quote
FishSauce Posted September 17, 2014 Author Posted September 17, 2014 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 Quote
Ewe Loon Posted September 27, 2014 Posted September 27, 2014 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 Quote
FishSauce Posted September 27, 2014 Author Posted September 27, 2014 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 Quote
Recommended Posts
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.