Busti Posted August 20, 2015 Posted August 20, 2015 I've been working with Forge for a long Time know. But I have never taken a step into git simply because I never needed it. Don't get me wrong here I know what git is and I know how to use it. I also used in the past to create some sort of online Backup for my mod. But I don't know how to use it with forge. Recently a Friend of mine joined me and I tried to make git work for both of us by uploading my mod files using Intellij Ideas git integration. So here is my question: Which files do I have to upload and how to make it work in a simple (clone repo to folder and open project) manner? Thanks in Advance, Busti Quote PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.
Busti Posted August 20, 2015 Author Posted August 20, 2015 Well thanks! That is exactly what I needed. I indeed know that github is just a platform based on git. For some reason I cant really explain I used "github" instead of "git" Quote PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.
Busti Posted August 21, 2015 Author Posted August 21, 2015 I tried it. I added every necessary file to git and cloned the repo to another pc. Afterwards I used the command "gradlew setupDecompWorkspace idea" to set everything up. It completed without any errors. I proceeded by opening the .ipr project file using the latest version of Intellij Idea. And thats where the problems started. For some reason all Libraries had to be added by hand to the module using File/Project Structure/Libraries/addToModule Which I did and it turned out to have worked even though it was a bit annoying to add over 50 libraries by hand. And everything seemed to be working. But now for some odd reason textures don't work. This may not be a git problem since copying the necessary files to a Stick and pasting them to the other pc would have done the same but I never did it before and cant quite understand the process yet. Where did I go wrong? Quote PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.
Busti Posted August 22, 2015 Author Posted August 22, 2015 The .ipr project file is not in my repo it was created using the gradlew idea command. These files / folders are in git: gradle/wrapper src/main build.gradle gradlew gradlew.bat Quote PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.
Busti Posted August 23, 2015 Author Posted August 23, 2015 That went surprisingly well. Is the old method deprecated as of IntelliJ Idea 14 or has the problem existed before? Quote PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.
Busti Posted August 23, 2015 Author Posted August 23, 2015 Nice, now I just have one minor problem. Librarys such as Not Enough Items dont seem to work. I use CodeChickenLib sometimes and the Code seems to work and compile but NEI, which I placed in the /libs folder wont show up. It worked before though. Yes I linked the libraries in my IDE. Quote PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.
Busti Posted August 23, 2015 Author Posted August 23, 2015 No there are no log problems. There are no logs from CCC and NEI at all. Normally both announce their presence during launch. Shouldn't files in /libs be added as mods anyways, even if you don't link them as Libraries? Quote PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.
Busti Posted August 23, 2015 Author Posted August 23, 2015 OK, I used the refresh button in the gradle tool window. It did nothing but removing the scala framework support. Quote PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.
SanAndreaP Posted August 24, 2015 Posted August 24, 2015 If a mod provides a maven repo, I highly suggest using that! for CCC and CCL, here's what I do: https://github.com/SanAndreasP/SAPManagerPack/blob/master/build.gradle#L50-L60 (Please note those versions are quitte outdated, but they work for testing) I don't depend on those in this mod, if you do, you'll need to declare CCC, CCL and NEI inside the buildscript area: https://github.com/SanAndreasP/VarietyChests/blob/master/build.gradle#L1-L28 Quote Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! | mah twitter This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.
Busti Posted August 24, 2015 Author Posted August 24, 2015 Thanks Where is the difference in the two solutions? Quote PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.
Busti Posted August 24, 2015 Author Posted August 24, 2015 Also CodeChickenLib does not seem to exist in the maven repo Quote PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.
SanAndreaP Posted August 24, 2015 Posted August 24, 2015 The difference is that the first doesn't actively reference CCC or NEI classes. Thus I don't need those when I compile the mod. The second one does reference NEI (for a compatibility thing), thus I need those classes to compile the mod. And the CCL reference may be an old one I didn't remove, now that I think about it. Since it's not in the maven repo (anymore), you don't need it. Also please note the first code is always needed, but the second one only if you actively reference a class from the mods. Quote Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! | mah twitter This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.
Busti Posted August 24, 2015 Author Posted August 24, 2015 It has been on files.minecraftforge.net for some time now. But the (possible) maven repo 404's for me. Is there any method to download it from a link? PS: I think I am at the point where I should apologize for this thread. I am not very experienced with gradle and ignored it to this point. Quote PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.
Busti Posted August 24, 2015 Author Posted August 24, 2015 Adding the Libraries in the build.gradle file downloaded them but they are not added as mods. Quote PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.
SanAndreaP Posted August 24, 2015 Posted August 24, 2015 Adding the Libraries in the build.gradle file downloaded them but they are not added as mods. Then show me your build.gradle. Quote Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! | mah twitter This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.
Busti Posted August 24, 2015 Author Posted August 24, 2015 buildscript { repositories { jcenter() maven { name = "forge" url = "http://files.minecraftforge.net/maven" } maven { name = 'CodeChicken' url = 'http://chickenbones.net/maven/' } } dependencies { classpath 'net.minecraftforge.gradle:ForgeGradle:2.0-SNAPSHOT' classpath 'codechicken:CodeChickenCore:1.8-1.0.5.36:dev' classpath 'codechicken:NotEnoughItems:1.8-1.0.5.104:dev' } } apply plugin: 'net.minecraftforge.gradle.forge' version = "0.3.5.1" group= "com.mlb.technica" archivesBaseName = "technica" minecraft { version = "1.8-11.14.3.1503" runDir = "eclipse" mappings = "snapshot_20141130" } task downloadCCLDev(type:LibDownloader) { sourceUrl = 'http://files.minecraftforge.net/maven/codechicken/CodeChickenLib/1.8-1.1.2.139/CodeChickenLib-1.8-1.1.2.139-dev.jar' target = file('libs/CodeChickenLib-dev.jar') } task downloadCCLSrc(type:LibDownloader) { sourceUrl = 'http://files.minecraftforge.net/maven/codechicken/CodeChickenLib/1.8-1.1.2.139/CodeChickenLib-1.8-1.1.2.139-src.jar' target = file('libs/CodeChickenLib-src.jar') } repositories { maven { name = 'CodeChicken' url = 'http://chickenbones.net/maven/' } maven { name = 'forge' url = 'http://files.minecraftforge.net/maven' } } dependencies { compile 'codechicken:CodeChickenCore:1.8-1.0.5.36:dev' compile 'codechicken:CodeChickenCore:1.8-1.0.5.36:src' compile 'codechicken:NotEnoughItems:1.8-1.0.5.104:dev' compile 'codechicken:NotEnoughItems:1.8-1.0.5.104:src' } processResources { inputs.property "version", project.version inputs.property "mcversion", project.minecraft.version from(sourceSets.main.resources.srcDirs) { include 'mcmod.info' expand 'version':project.version, 'mcversion':project.minecraft.version } from(sourceSets.main.resources.srcDirs) { exclude 'mcmod.info' } } idea { module { inheritOutputDirs = true } } class LibDownloader extends DefaultTask { @Input String sourceUrl @OutputFile File target @TaskAction void download() { ant.get(src: sourceUrl, dest: target) } } Quote PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.
Busti Posted August 24, 2015 Author Posted August 24, 2015 2nd Bump... Also github should be working right now. Even though its still a bit empty. All the files are there if you need a more insightful look... github.com/Busti/Technica Quote PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.
SanAndreaP Posted August 25, 2015 Posted August 25, 2015 CCC and NEI are added as libraries for me. The only thing that isn't is CCL. That is because you try to download it via the LibDownloader, but don't actually tell it do download anything, see here: https://github.com/SanAndreasP/VarietyChests/blob/master/build.gradle#L64-L65 Quote Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! | mah twitter This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.
Busti Posted August 25, 2015 Author Posted August 25, 2015 I already updated it but didn't push the updated yet. It has not been in in the posted file either. The libraries have successfully been downloaded to the libs folder but they are neither linked in the IDE (I have to do it manually) nor are they being compiled. Even adding this to the build.gradle file does not help. dependencies { compile fileTree(dir: 'libs', include: '*.jar') } The maven repos are not being compiled as well. Thus NEI wont start. Quote PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.
Busti Posted August 25, 2015 Author Posted August 25, 2015 A Summary Have you tried turning it off and on again? Now I have... After deleting everything it is working like a charm. And I have learned many things about gradle... Also SanAndreasP and Diesieben07 I owe the tow of you a Beer. Please remind me if we ever meet. Thank you for all the help. Thus: Quote PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.
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.