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

[Solved] Latest Forge Mapping For 1.16


Recommended Posts

I am trying to update my mappings, but the MCPBot Exports is only up to 1.15, so how do I update my mappings? Using the official Mojang mappings is a pain, because everything is named differently so my whole mod breaks.

My current build.gradle:

buildscript {
    repositories {
        maven { url = 'https://files.minecraftforge.net/maven' }
        jcenter()
        mavenCentral()
    }
    dependencies {
        classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', 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.0'
group = 'com.yourname.modid' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'br_block_creatures'

sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.

println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch'))
minecraft {
    // The mappings can be changed at any time, and must be in the following format.
    // snapshot_YYYYMMDD   Snapshot are built nightly.
    // stable_#            Stables are built at the discretion of the MCP team.
    // Use non-default mappings at your own risk. they may not always work.
    // Simply re-run your setup task after changing the mappings to update your workspace.
    mappings channel: 'official', version: '1.16.5'
    // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
    
    // accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')

    // Default run configurations.
    // These can be tweaked, removed, or duplicated as needed.
    runs {
        client {
            workingDirectory project.file('run')

            // Recommended logging data for a userdev environment
            property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'

            // Recommended logging level for the console
            property 'forge.logging.console.level', 'debug'

            mods {
                examplemod {
                    source sourceSets.main
                }
            }
        }

        server {
            workingDirectory project.file('run')

            // Recommended logging data for a userdev environment
            property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'

            // Recommended logging level for the console
            property 'forge.logging.console.level', 'debug'

            mods {
                examplemod {
                    source sourceSets.main
                }
            }
        }

        data {
            workingDirectory project.file('run')

            // Recommended logging data for a userdev environment
            property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'

            // Recommended logging level for the console
            property 'forge.logging.console.level', 'debug'

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

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

dependencies {
    // Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed
    // that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied.
    // The userdev artifact is a special name and will get all sorts of transformations applied to it.
    minecraft 'net.minecraftforge:forge:1.16.5-36.1.0'

    // You may put jars on which you depend on in ./libs or you may define them like so..
    // compile "some.group:artifact:version:classifier"
    // compile "some.group:artifact:version"

    // Real examples
    // compile 'com.mod-buildcraft:buildcraft:6.0.8:dev'  // adds buildcraft to the dev env
    // compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env

    // The 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
    // provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'

    // These dependencies get remapped to your current MCP mappings
    // deobf 'com.mod-buildcraft:buildcraft:6.0.8:dev'

    // For more info...
    // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
    // http://www.gradle.org/docs/current/userguide/dependency_management.html

}

// 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"
        }
    }
}

 

Edited by NullDev
Link to post
Share on other sites
  • NullDev changed the title to [Solved] Latest Forge Mapping For 1.16

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
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.



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • That is just the modpack, no logs.
    • I created a modpack for me and my friends but we constantly crash after ~5 minutes of playing , Can some one help me please ? Here are the logs and the modpack : https://www.mediafire.com/file/kqnui7c0wzu8t7k/VladPack4-1.16.5.zip/file
    • I wrote a class that stores the BlockPos and BlockState of a specific block that needs to be changed into another block after a certain amount of time. So far I just coded stone bricks being changed into cracked stone bricks. In every worldtickevent I call a method called onTick in which there is a slight chance (1 in 1000) that this change will occur. The class that does this is called DecayHandler.java   DecayHandler.Java :   public class DecayHandler { public BlockState blockState; public BlockPos blockPos; public World world; private Random random; public int decayChance = 1000; private boolean decayed = false; public DecayHandler(BlockState blockState, BlockPos blockPos, World world){ this.blockState = blockState; this.blockPos = blockPos; this.world = world; random = new Random(); } public DecayHandler OnTick(){ //TODO: Refactor in other methods and implement BlockSwapper if(random.nextInt(decayChance) == 0 && !decayed){ System.out.println(this.blockPos + " Decayed"); if(world.setBlockAndUpdate(blockPos, Blocks.CRACKED_STONE_BRICKS.getBlock().defaultBlockState())){ this.blockState = Blocks.CRACKED_STONE_BRICKS.getBlock().defaultBlockState(); decayed = true; return this; } } //WorldDecayData.get(); return null; } }   This code works fine when I load in to a world and place stone bricks down. The stone bricks stay there for a couple of seconds and then they change into cracked stone bricks. The problem occurs when I save and quit to title and rejoin the same world when I placed stone brick that hadn't decayed yet. The game seems to remember what DecayHandlers were running which I guess is logical because I never closed it. So when the world is reloaded again my code stops without error and no longer functions. I can see in the terminal that the last message that was displayed was that a block decayed so I put a breakpoint on it to see what went wrong. By the way, the game keeps running just fine but my code just stops. The part where it seems to go wrong is in this line:  if(world.setBlockAndUpdate(blockPos, Blocks.CRACKED_STONE_BRICKS.getBlock().defaultBlockState())) When I try to step in to every single detail the callstack becomes insanely large and I'm unable to understand what's going on. The only thing I know is that right at the end they put my thread in to parking or something? I really don't understand what was going on. Can someone explain why this is happening? I don't have a clue of what's going on.
    • Thank you @ChampionAsh5357 for your replies and useful feedback! I'll follow your advice and see where it takes me.
    • This statement is a bit incorrect. The methods still exist, they just use a different mapping set (MCP) than what forge ships with the mdk by default (mojmap). You can use forge-bot on the Forge Discord or Linkie on the Linkie Discord to translate from them. I would probably use a chunk capability instead and tick logic on loaded chunks since you'd have to check every block if it's loaded other than checking the loaded chunks. You could also use a world capability to store the chunks that have an active capability for more efficient usage.
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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