minecraft-dev / MinecraftDev

Plugin for IntelliJ IDEA that gives special support for Minecraft modding projects.
https://minecraftdev.org/
GNU Lesser General Public License v3.0
1.5k stars 185 forks source link

"Minecraft Class" helpers do not support Mojang's official mappings #808

Open ChloeDawn opened 3 years ago

ChloeDawn commented 3 years ago

2020.2-1.5.2

In a Fabric environment that uses official mappings, the helper attempts to use Yarn mappings.

mappings(minecraft.officialMojangMappings())

It should be using the mappings configured for the current workspace.

Screenshot of new object tooltip Screenshot of class creation modal Screenshot of resulting class

Tom-The-Geek commented 3 years ago

This was a feature I implemented, and I obviously didn't realise the mapping differences at the time. You should be able to adjust the templates if you want by going to Settings -> Editor -> File and Code Templates and then Skeletons under the Minecraft dropdown.

The reason it doesn't use the current mappings is that the template is predefined. I should probably work on it remapping the templates as it places them into a project or something similar.

jamierocks commented 3 years ago

Yeah, seems to me that the template should be in intermediary mappings and then resolved when created.

DenWav commented 3 years ago

Yeah, that's something we'll be able to do somewhat soon, once my overall mappings handling rewrite is done. Until then, editing the template is the best route.

Earthcomputer commented 3 years ago

Related to #771