Jump to content

I am trying to override a create recipe, but it doesn't work.


Drai

Recommended Posts

Hi, Me and a Friend have been trying to override a create mod recipe, but we can never seem to get it to work. I have tested if the recipe is valid, and it is, but when I place it in the right folder to override the original one, it doesn't work. I've got my mod set to load before create, and I have tried making it load after create too. Could someone take a look and suggest something I could change? At this point I am just thinking of overriding the recipe in the code instead. https://github.com/StijnArts/Pixelmon-Create-Compat

Link to comment
Share on other sites

buildscript {
    repositories {
        maven { url = 'https://maven.minecraftforge.net' }
        mavenCentral()
    }
    dependencies {
        classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
    }
}
apply plugin: 'net.minecraftforge.gradle'
// Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
apply plugin: 'eclipse'
apply plugin: 'maven-publish'

version = '1.0'
group = 'com.yourname.modid'
archivesBaseName = 'modid'

java.toolchain.languageVersion = JavaLanguageVersion.of(8)

minecraft {
    mappings channel: 'official', version: '1.16.5'
    runs {
        client {
            workingDirectory project.file('run')

            property 'forge.logging.markers', 'REGISTRIES'
            property 'forge.logging.console.level', 'debug'

            mods {
                examplemod {
                    source sourceSets.main
                }
            }
        }

        server {
            workingDirectory project.file('run')

            property 'forge.logging.markers', 'REGISTRIES'
            property 'forge.logging.console.level', 'debug'

            mods {
                examplemod {
                    source sourceSets.main
                }
            }
        }

        data {
            workingDirectory project.file('run')

            property 'forge.logging.markers', 'REGISTRIES'

            property 'forge.logging.console.level', 'debug'

            args '--mod', 'examplemod', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')

            mods {
                examplemod {
                    source sourceSets.main
                }
            }
        }
    }
}

// Include resources generated by data generators.
sourceSets.main.resources { srcDir 'src/generated/resources' }

dependencies {
    minecraft 'net.minecraftforge:forge:1.16.5-36.2.34'
}

// Example for how to get properties into the manifest for reading by the runtime..
jar {
    manifest {
        attributes([
            "Specification-Title": "examplemod",
            "Specification-Vendor": "examplemodsareus",
            "Specification-Version": "1", // We are version 1 of ourselves
            "Implementation-Title": project.name,
            "Implementation-Version": "${version}",
            "Implementation-Vendor" :"examplemodsareus",
            "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
        ])
    }
}

// Example configuration to allow publishing using the maven-publish task
// This is the preferred method to reobfuscate your jar file
jar.finalizedBy('reobfJar') 
// However if you are in a multi-project build, dev time needs unobfed jar files, so you can delay the obfuscation until publishing by doing
//publish.dependsOn('reobfJar')

publishing {
    publications {
        mavenJava(MavenPublication) {
            artifact jar
        }
    }
    repositories {
        maven {
            url "file:///${project.projectDir}/mcmodsrepo"
        }
        maven {
            url 'https://www.cursemaven.com'
            // FG4: It's recommended to uncomment the following block
             content {
                includeGroup "curse.maven"
            }
        }
        maven {
            url "curse.maven:flywheel-486392:3354313"
            content {
                includeGroup 'curse.maven'
            }
        }
        maven {
            url "curse.maven:create-328085:3536025"
            content {
                includeGroup 'curse.maven'
            }
        }
        flatDir {
            dirs 'lib'
        }
    }
}

For whatever reason this doesn't work, and I don't know what I am doing wrong because I am not getting any errors when I build it. Do you see anything I am doing wrong?

Link to comment
Share on other sites

Okay, something weird is happening. my recipe is overriding the create recipe as it should in the testing environment, but if I copy the exact same mods and a jar version of my mod to a multimc testing environment, it no longer overrides it. Does anyone know why this might be happening?

Link to comment
Share on other sites

I agree, which is why I find it strange that it doesn't. Could my other dependency be interfering with it? Also, is my mods.toml being used at all? I have tried removing the create mod and it gave me the dependency missing error, but loading it in a fresh profile in multimc still doesn't give me the desired result.

 

Also, should I be rebuilding my gradle every time I change my mods.toml?

Edited by Drai
Link to comment
Share on other sites

Okay, So additional info: it only worked in testing in a very specific instance: 

Remove my mod -> launch the game -> create a world -> close the game -> add my mod -> launch the game and open the world. Though this only works one time.

The mods that are loaded during testing are:

flywheel 0.2.5

Create 0.3.2g

JEI 7.7.1.152

Pixelmon Mod 9.0.1

Pixelmon Create Compat (My mod)

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.



×
×
  • Create New...

Important Information

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