neoforged / Documentation

The repository containing Neo's documentation
MIT License
23 stars 36 forks source link

Clarifications needed to 'change the name of a mod' in "Getting Started with NeoForge" #63

Closed Veltarden closed 1 month ago

Veltarden commented 2 months ago

So, I'm starting in minecraft modding, and found it very unclear when trying to change the name of my mod. As it reads on the document, on the section "Customizing Your Mod Information"

"Many of the basic properties of your mod can be changed in the gradle.properties file. This includes basic things like the mod name or the mod version."

Further by investigating, you stumble across mod files and find the definition of the property "mod_id"

"The id of your mod. This should be something unique and memorable, as having two mods with the same id will prevent the game from loading. The mod id shows up in a lot of places, for example as the namespace for all your registered things, or as the namespace for your resource and data packs."

One starting would think that in order to change the mod name you would only need to change this variable, but it turns out that there are more elements that interfere when building the mod and are related to the name, so if you only changed that property, it would cause trouble for mods to properly build.

Might be redundant for some but wouldn't it be more clear to say or suggest in the for example that in order to change the name of the mod, there are other properties that need to be changed properly? For example, in the definition of "mod_id":

"Note that this is not the only property related to the mod name, only changing this variable can create issues".

Regardless of that issue, thanks in advance for the support.

IchHabeHunger54 commented 1 month ago

Hello, sorry for the late response, this issue kinda went under the radar.

The mod id is explicitly not the mod name. The mod name (or to be more exact, mod display name) is a property that is independent from the mod id by design. Changing the mod id in the MDK's gradle.properties should be enough to change all occurences of the mod id in the project. If that is not the case, this is likely a bug in the MDK. To diagnose this further, we would kindly need more information than "the mod fails to build".

IchHabeHunger54 commented 1 month ago

Ater pointed me towards the @Mod-annotated class on Discord, which needs the parameter changed to the mod id mentioned. I completely forgot about that, and I will add that in a moment. Are there other places I forgot about?