Jump to content

[SOLVED]Setting up Git correctly / Gradle Problems


Busti

Recommended Posts

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

PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.

Link to comment
Share on other sites

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?

PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.

Link to comment
Share on other sites

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.

PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.

Link to comment
Share on other sites

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?

PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.

Link to comment
Share on other sites

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

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.

Link to comment
Share on other sites

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.

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.

Link to comment
Share on other sites

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.

PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.

Link to comment
Share on other sites

Adding the Libraries in the build.gradle file downloaded them but they are not added as mods.

 

Then show me your build.gradle.

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.

Link to comment
Share on other sites

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)
    }
}

PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.

Link to comment
Share on other sites

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

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.

Link to comment
Share on other sites

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.

PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.

Link to comment
Share on other sites

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:

giphy.gif

PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.

Link to comment
Share on other sites

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • hey, I'm trying to make a server with mods and it's not working. when I run it without mods, it works normally Log:[27maj2024 17:53:12.540] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--launchTarget, forgeserver, --fml.forgeVersion, 40.2.0, --fml.mcVersion, 1.18.2, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20220404.173914] [27maj2024 17:53:12.544] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 9.1.3+9.1.3+main.9b69c82a starting: java version 22.0.1 by Oracle Corporation [27maj2024 17:53:12.660] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=union:/C:/Users/kamil/Desktop/server/libraries/org/spongepowered/mixin/0.8.5/mixin-0.8.5.jar%2314!/ Service=ModLauncher Env=SERVER [27maj2024 17:53:13.006] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file C:\Users\kamil\Desktop\server\libraries\net\minecraftforge\fmlcore\1.18.2-40.2.0\fmlcore-1.18.2-40.2.0.jar is missing mods.toml file [27maj2024 17:53:13.010] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file C:\Users\kamil\Desktop\server\libraries\net\minecraftforge\javafmllanguage\1.18.2-40.2.0\javafmllanguage-1.18.2-40.2.0.jar is missing mods.toml file [27maj2024 17:53:13.013] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file C:\Users\kamil\Desktop\server\libraries\net\minecraftforge\lowcodelanguage\1.18.2-40.2.0\lowcodelanguage-1.18.2-40.2.0.jar is missing mods.toml file [27maj2024 17:53:13.015] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file C:\Users\kamil\Desktop\server\libraries\net\minecraftforge\mclanguage\1.18.2-40.2.0\mclanguage-1.18.2-40.2.0.jar is missing mods.toml file [27maj2024 17:53:13.101] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.JarInJarDependencyLocator/]: No dependencies to load found. Skipping! [27maj2024 17:53:15.035] [main/INFO] [mixin/]: Compatibility level set to JAVA_17 [27maj2024 17:53:15.075] [main/INFO] [cpw.mods.modlauncher.LaunchServiceHandler/MODLAUNCHER]: Launching target 'forgeserver' with arguments [] [27maj2024 17:53:15.139] [main/WARN] [mixin/]: Reference map 'bloodmagic.refmap.json' for bloodmagic.mixins.json could not be read. If this is a development environment you can ignore this message [27maj2024 17:53:15.415] [main/WARN] [mixin/]: Error loading class: net/minecraft/world/item/ItemStack (java.lang.IllegalArgumentException: Unsupported class file major version 66) [27maj2024 17:53:15.416] [main/WARN] [mixin/]: @Mixin target net.minecraft.world.item.ItemStack was not found placebo.mixins.json:ItemStackMixin [27maj2024 17:53:15.439] [main/WARN] [mixin/]: Error loading class: java/lang/invoke/MethodHandles$Lookup (java.lang.IllegalArgumentException: Unsupported class file major version 66) [27maj2024 17:53:15.447] [main/WARN] [mixin/]: Error loading class: java/lang/invoke/MethodHandles$Lookup (java.lang.IllegalArgumentException: Unsupported class file major version 66) [27maj2024 17:53:15.449] [main/WARN] [mixin/]: Error loading class: java/lang/invoke/MethodHandles$Lookup (java.lang.IllegalArgumentException: Unsupported class file major version 66) [27maj2024 17:53:15.456] [main/WARN] [mixin/]: Error loading class: java/lang/invoke/MethodHandles$Lookup (java.lang.IllegalArgumentException: Unsupported class file major version 66) [27maj2024 17:53:15.457] [main/WARN] [mixin/]: Error loading class: java/lang/invoke/MethodHandles$Lookup (java.lang.IllegalArgumentException: Unsupported class file major version 66) [27maj2024 17:53:15.461] [main/WARN] [mixin/]: Error loading class: java/util/Map$Entry (java.lang.IllegalArgumentException: Unsupported class file major version 66) [27maj2024 17:53:15.461] [main/WARN] [mixin/]: Error loading class: java/lang/invoke/MethodHandles$Lookup (java.lang.IllegalArgumentException: Unsupported class file major version 66) [27maj2024 17:53:15.463] [main/WARN] [mixin/]: Error loading class: java/lang/invoke/MethodHandles$Lookup (java.lang.IllegalArgumentException: Unsupported class file major version 66) [27maj2024 17:53:15.463] [main/WARN] [mixin/]: Error loading class: java/lang/invoke/MethodHandles$Lookup (java.lang.IllegalArgumentException: Unsupported class file major version 66) [27maj2024 17:53:16.436] [main/WARN] [mixin/]: Error loading class: java/lang/Boolean (java.lang.IllegalArgumentException: Unsupported class file major version 66) Mods:https://ibb.co/xj5qHYK
    • How did you manage to get it working?
    • Hi Everyone! I was playing in modded singleplayer, and suddenly mobs stopped moving, I couldn't hit them, basically I could do things but nothing happened, like destroying blocks didn't drop it, things like that. When I tried to quit and save my world, it was just writing Saving World but nothing happened, and eventually I always had to restart my computer to stop minecraft. Can someone please help me find out what could cause the issue? Here is my debug log: https://pastebin.com/X9F0M9sq This is not the complete debug log, I was pasting the last couple of hundreds of rows because of the size. In case it's needed, I will repaste rows earlier. Thank you very much in advance!  
    • As stated in the Title, I can't download forge for minecraft 1.20.06. When I click on the install button i get the AD wall, but after 10 seconds i don't get the red button to install forge.  This problem also implies the older versions of Forge I also don't see any ads on the site. Does anybode know what to do?  
    • I want to download Forge 1.20.6, but when I press download, it redirects me to Adfocus and does not provide any download. I have never encountered such a problem when I downloaded Forge 1.18.2 at least 12 months ago.
  • Topics

×
×
  • Create New...

Important Information

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