FML icon indicating copy to clipboard operation
FML copied to clipboard

Change Mod to require a name.

Open jamierocks opened this issue 11 years ago • 10 comments

Feel free to discuss my changes.

jamierocks avatar Jan 17 '15 11:01 jamierocks

I agree with this. When you're first changing it, maybe require a version too?

coolsquid avatar Jan 17 '15 12:01 coolsquid

Some people don't do this because their modid is the exact same thing as what their name would be. Now, I'm not saying it's ok, but I can understand why people wouldn't put a name. Also, this would break the debug mods in Forge testing.

Parker8283 avatar Jan 17 '15 13:01 Parker8283

I'm against forcing a version number, as my mods load the version of the mod based on a file that gets generated during build. (Because there is no easy way to add the version to the annotation and get it replaced when building)

heldplayer avatar Jan 17 '15 16:01 heldplayer

Uhh...in the minecraft block in your buildscript, there's a replace thing. replace "@MOD_VERSION@", project.version

Works just fine,

Parker8283 avatar Jan 17 '15 16:01 Parker8283

I don't agree with forcing the version in the @Mod. I personally let FML use the version.properties file to get the version, and leave the @Mod version out. This is arguably a better method than doing version replacing on source files.

matthewprenger avatar Jan 17 '15 23:01 matthewprenger

The intended method is for the the version to be valid in the @Mod so that we can pragmatically grab the data without having to actually run any code. So it may be worth it to force this information, but i'd like to see code wise people's usecases.

LexManos avatar Jan 18 '15 07:01 LexManos

I concur with Lex; this is the only use case I need. The more streamlined the accessing of a version attribute is, the less likely for confusion with "alternate" mod versioning practices.

JustGregory-zz avatar Jan 18 '15 09:01 JustGregory-zz

I always have a name for my mods anyway, I just stated why people don't have names. As for the version, in dev, my version is always @MOD_VERSION@, and it gets replaced with FG, as I described above. I agree that forcing this stuff may be useful in some cases.

Parker8283 avatar Jan 18 '15 09:01 Parker8283

From a bit of research some mods aren't specifying the version. IronChest CompactSolars Then again some are. Applied Energistics Tinkers Construct

jamierocks avatar Jan 18 '15 10:01 jamierocks

The first two aren't because cpw always used a version.properties file (which, according to the log, is the first fallback when one isn't specified in the annotation)

Parker8283 avatar Jan 18 '15 10:01 Parker8283