#"Package net.minecraft.block not found" - broken mappings (?) after porting to 1.21.1

13 messages · Page 1 of 1 (latest)

grand scarab
#

Hey there, I'm currently trying to help a friend move our custom mod (wich just adds a ton of blocks for building, nothing more) from 1.20.1 to 1.21.1. The Mod previously has been generated by MCreator and then ported to 1.20.1.

I'm not really experienced with modding, and just want to try to get the mod to compile. Currently I'm getting compile errors like Package net.minecraft.block / net.minecraft.registry not found. I suspect it has to do with mappings being broken, don't really know where to look or what exactly to fix. I already tried copying the mappings from the fabric website and paste them into the corresponding Gradle config files, but that doesn't seem to resolve the isse.

I cannot provide a link to the Github, but can send certain files if needed to look at, just let me know wich ones.

Parts of the build.gradle:

dependencies {
    minecraft "com.mojang:minecraft:1.21.1"
    mappings loom.officialMojangMappings()
    modImplementation "net.fabricmc:fabric-loader:0.16.7"

    //Fabric api
    modImplementation "net.fabricmc.fabric-api:fabric-api:0.107.0+1.21.1"
}
bronze nova
#

did you accidentally switch to mojmap?

grand scarab
#

i dont think so? i honestly dont know...
where would i check that?

#

searched through all project files and there was nothing "mojmap" found

bronze nova
#

mappings loom.officialMojangMappings()

grand scarab
#

ahh ok
what should i replace that with?

bronze nova
#

depends on what your project is using

#

was your project using yarn previously?

grand scarab
#

i think so yeah

bronze nova
grand scarab
#

i think that seemed to fix it? thanks!
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" so it just gets the correct version from somewhere in my project?

#

welp off i go fixing all the API changes

bronze nova
#

it pulls the ${project.some_thing_here} from your gradle.properties