#cant figure out how to make imports work in my fabric mod
13 messages · Page 1 of 1 (latest)
Try closing intellij, deleting the .idea directory, then reopening it?
I'll try that when I get back home, I think it's just net.minecraft imports tho
Are you using mojang mappings or yarn mappings?
Easy way to find out is to try to import MatrixStack or PoseStack. The first is Yarn, the second is MojMap
!!mappings
Mappings are an essential part of modding Minecraft with any tool.
Mappings change the fields, methods, classes, and parameters from unusable nonsense like cdr.a into more readable code like net.minecraft.Block.Blocks.AIR.
The mappings Fabric uses are created and maintained by the Fabric community and are called "yarn mappings".
Fabric mappings are used on top of intermediaries so that the mappings generally work from version to version.
Intermediaries are also a type of mapping that stays consistent through versions.
So if a variable was named cdr.a in one version but the next one it was named cer.b, the intermediary name of class_2246.field_10124 will stay the same.
There are a variety of different mappings people have made, such as Spigot mappings, Mojang mappings, and MCP mappings.
You do not necessarily need to know what mappings are in order to mod the game with Fabric, but it certainly does help.
The mappings that Fabric uses are available here, with every version that we have mapped being under a separate branch: https://github.com/FabricMC/yarn.
A more in-depth explanation can be found at https://fabricmc.net/wiki/tutorial:mappings.
You can change to use mojang mappings if you're currently using yarn (that lines up with forge better)
MinecraftClient is yarn but they said it works in forge?