MinecraftDev icon indicating copy to clipboard operation
MinecraftDev copied to clipboard

Template: Mixin refmap file is named with capitalized "Mod Name" but Gradle script uses uncapitalized "Mod ID" to reference it

Open ByThePowerOfScience opened this issue 1 year ago • 0 comments

Minecraft Development for IntelliJ plugin version

2024.1-1.7.5

IntelliJ version

IntelliJ IDEA 2024.1 (Ultimate Edition)

Operating System

OSX

Target platform

Minecraft Forge, Mixins

Description of the bug

Creating a project with:

  • Platform Type: Mod
  • Platform: Forge
  • Minecraft Version: 1.20.1
  • Forge Version: 47.3.1
  • Uses Mixins: √

When creating a project with this template, the "refmap" property in <modid>.mixins.json is set to the capitalized "Mod Name" + .refmap.json. However, in the generated Gradle file, the mixin block has add sourceSets.main, "${mod_id}.refmap.json" which uses the uncapitalized mod ID. This causes the refmap to not be resolved in prod.

Example:

With a project named "MyExampleProject" and using autofill for the rest of the fields:

  • mod_id will be myexampleproject
  • mod_name will be MyExampleProject
  • Gradle will have, when resolved: mixin { add sourceSets.main, "myexampleproject.refmap.json" }
  • myexampleproject.mixins.json will have "refmap": "MyExampleProject.refmap.json".

ByThePowerOfScience avatar Jun 09 '24 00:06 ByThePowerOfScience