Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

  • Last visited

Posts posted by xalcon

  1. So, a lot of people still try to get the Jar-in-Jar system in their mod working and it seems there is no documentation available. This wont be a guide (its most likely not the optimal way to do it), but it might help you to get started.


    Forge allows you to specify the ContainedDep manifest attribute. This attribute is a space separated list of file names (jar files) which will be extracted from your jar and then loaded into the mod-class loader (at the time of writing, those mods are not examined for coremods, so you will need to package your mod into the coremod jar. This works just fine for APIs and other libraries though! See https://github.com/MinecraftForge/MinecraftForge/pull/4081)


    The following gradle code will build 2 additional jars: An API jar (which could also be a coremod jar or whatever else) and the Mainmod Jar without the API code. The Mainmod jar will include the API jar, allowing for easy distribution.

    CPW said its just 2 lines in your build.gradle to setup jar-in-jar distribution... So it seems I'm missing a feature in forge gradle. If you have a more clean gradle script for this, please post it!


    // at the end of your build.gradle
    // Create API library zip
    // Warning: This jar will be reobfuscated! Its only used to package it with the universal jar
    task apiJar(type: Jar) {
    	from(sourceSets.main.output) {
    		// only include the classes from our API packages
            include "**/api/**"
        classifier = 'obfapi'
        includeEmptyDirs = false
    // task to create a jar containing all classes from the main sourceSet output and the api.jar
    // also sets up the manifest attribute 'ContainedDeps' which fml uses to extract the api jar at runtime
    task packedJar(type: Jar, dependsOn: 'reobfApiJar') {
        manifest {
            attributes 'ContainedDeps': "${archivesBaseName}-${version}-obfapi.jar"
        from(sourceSets.main.output) {
            // exclude the API classes, those will be included as their own jar
        from("${buildDir}/libs") {
        classifier = 'universal'
    // tell forge gradle to reobfuscate our jars
    reobf {
        apiJar { }
        packedJar { }


    • Thanks 1
  2. For future reference


    [23:05:07] <@LexMobile> FML has mechanics for extracting jars from jars
    [23:05:15] <@LexMobile> So packaging to the end user is still the same

    If I understand this correctly, we would be allowed to put the coremod into its own jar and put that jar into the actual mod jar. While this might not be very useful for modders that use a coremod in multiple mods, it might be useful if its only a change for a single mod.

    Question I have: could you point me and others to the jar extraction mechanic FML provides? I dont intend on using a coremod at all, but just in case.

    • Like 2
  3. Hello!

    I'm trying to render multiple layers of a block with different brightness values to achieve a "glow in the dark" effect without actually emitting any light.

    I was able to do this by returning a different lightmap coordinate depending on the tint index. While this works fine, it requires a fair amount of reflection, since i need to read the information from VertexLighterFlat#tint (ForgeBlockModelRenderer#lighterFlat)


    My suggestion would be to somehow make the tint index information available to Block#getPackedLightmapCoords(). Currently, I can think of 3 ways to do this, but there are maybe a few more

    • pass the tint index to Block#getPackedLightmapCoords(). The information is available in VertexLighterFlat#updateLightmap so it can just be passed to IBlockState#getPackedLightmapCoords(). The issue here is, its not the only place where Block#getPackedLightmapCoords() (or IBlockState#getPackedLightmapCoords()) is called and not all of those spots have a tint index available. We could pass -1 in those cases tho.
    • Make the tint index available via a getter method. Either from ForgeBlockModelRenderer directly or from VertexLighterFlat (this one only has a setter method atm). If we go with the latter one, we also need a getter in ForgeBlockModelRenderer to get the VertexLighterFlat instance
    • Add new interface to get the brightness for a specific tint index, similar to IBlockColor


    Like I said, i currently use reflection to get the tint index, so I know it works - atleast partially, who knows how this might break. If there is a different way to achieve what I'm doing atm, tell me D:


  4. [...]

    2013-07-02 16:41:14 [sEVERE] [ForgeModLoader] There was a problem downloading the file deobfuscation_data_1.5.2.zip automatically. Perhaps you have an environment without internet access. You will need to download the file manually or restart and let it try again


    2013-07-02 16:41:14 [FINEST] [ForgeModLoader] Found library file scala-library.jar present and correct in lib dir

    2013-07-02 16:41:14 [sEVERE] [ForgeModLoader] There were errors during initial FML setup. Some files failed to download or were otherwise corrupted. You will need to manually obtain the following files from these download links and ensure your lib directory is clean.

    2013-07-02 16:41:14 [sEVERE] [ForgeModLoader] *** Download http://files.minecraftforge.net/fmllibs/argo-small-3.2.jar

    2013-07-02 16:41:14 [sEVERE] [ForgeModLoader] *** Download http://files.minecraftforge.net/fmllibs/guava-14.0-rc3.jar

    2013-07-02 16:41:14 [sEVERE] [ForgeModLoader] *** Download http://files.minecraftforge.net/fmllibs/asm-all-4.1.jar

    2013-07-02 16:41:14 [sEVERE] [ForgeModLoader] *** Download http://files.minecraftforge.net/fmllibs/bcprov-jdk15on-148.jar

    2013-07-02 16:41:14 [sEVERE] [ForgeModLoader] *** Download http://files.minecraftforge.net/fmllibs/deobfuscation_data_1.5.2.zip

    2013-07-02 16:41:14 [sEVERE] [ForgeModLoader] *** Download http://files.minecraftforge.net/fmllibs/scala-library.jar

    2013-07-02 16:41:14 [sEVERE] [ForgeModLoader] <===========>

    2013-07-02 16:41:14 [sEVERE] [ForgeModLoader] The following is the errors that caused the setup to fail. They may help you diagnose and resolve the issue


    Just read the log o_o"

    Download the 6 listed files, put them into your .minecraft/lib folder (or server/lib, depending on what you are using) and start it again

  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.