Modular Forcefield System

Modular Forcefield System

5M Downloads

mod information are inconsistent and outdated

LemADEC opened this issue ยท 0 comments

commented

As of 1.12.2-4.0.1.0_1.12_cc3a5aa:

You can use gradle to replace your version tags and keep those in sync.
For example to update your @version@ tag in java sources:

minecraft {
    ...
    // replacing
    replace "@version@", project.version
    replaceIn "ModularForceFieldSystem.java"
}

For example to expand version references in mcmod.info:


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, that's not the mcmod.info
    from(sourceSets.main.resources.srcDirs) {
        exclude 'mcmod.info'
    }
}