MinecraftForge / AccessTransformers

Antlr4 definition for MCP / Forge Access Transformers
GNU Lesser General Public License v2.1
14 stars 12 forks source link

Repo name and examples in FMLAT are misleading #5

Closed Laike-Endaril closed 5 years ago

Laike-Endaril commented 5 years ago

In forge 1.12.2 access transformer files, the srg fieldname is required, but in FMLAT.md, the single-field example uses the deobfuscated name:

public-f net.minecraft.world.WorldType worldTypes

jamierocks commented 5 years ago

That's merely an example of using access transformers alone, not as part of the Forge toolchain. It wouldn't make sense to mention SRG names, as AccessTransformers doesn't operate with a concept of mappings.

Laike-Endaril commented 5 years ago

I was under the impression that this was specifically for use with minecraft forge, since the repo is MinecraftForge/AccessTransformers, but maybe I'm misunderstanding something on a different level?

Is there some environment where you would use deobfuscated names in an access transformer? My experience with them is strictly limited to using them in a forge mod (which requires that you use the srg name, even within the dev environment)

Edit: The readme does seem to imply that this can be used for any java project, but if that's true then FMLAT is still very misleading, as it specifically mentions ForgeGradle and specifically uses minecraft classes for its examples, yet the single-field example contained within it would never work when used in a standard forge mod development environment, as far as I can tell.

jamierocks commented 5 years ago

AccessTransformers has no concept of mappings. Neither is it explicitly tied into the Forge ecosystem, it could easily be used by others.

Though perhaps it would be better to use different examples.

Laike-Endaril commented 5 years ago

Alright, thanks for clarifying.

This being the case, the repo literally being labeled with a nice big "MinecraftForge/AccessTransformers" is exceedingly deceptive.

The examples are in the same boat.

Both those points aside, I can only assume the single-field example might work in some unknown environment, but it most certainly does not work in a standard 1.12.2 forge modding environment. It never states what environment that example is to be used in as far as I can see, so it's left to the observer's imagination.

I'll change the title of this issue.

jamierocks commented 5 years ago

This being the case, the repo literally being labeled with a nice big "MinecraftForge/AccessTransformers" is exceedingly deceptive.

So everything in the Microsoft organisation runs exclusively on Microsoft software? \s

It never states what environment that example is to be used in as far as I can see, so it's left to the observer's imagination.

AccessTransformers is unopinionated, it doesn't have a concept of mappings - sure the Forge ecosystem does, and those examples wouldn't work there - but they're a hell of a lot better at explaining access transformers than SRG names. That document explains how to use AccessTransformers, not access transformers within the Forge ecosystem.

Laike-Endaril commented 5 years ago

I get what you're saying, but my main point is that the combination of the nameset used in the examples and the repo name both contribute to what I would expect to be a very common misunderstanding.

Also, the examples are using MCP names if I'm not mistaken, which are based on SRG names, which are mapped from obfuscated names, which are mapped from unobfuscated names. Ie. the nameset currently being used in the examples is about as specific/opinionated as it gets.

If generalized examples were the goal, it might be better to use fake, unobfuscated example names instead of real, deobfuscated ones.

If more specific, actually working examples were the goal, then an environment should be chosen and specified, and the examples should all actually work within that environment. I believe all current examples do actually work in a forge mod except the single-field example.

DenWav commented 5 years ago

You're grasping at straws here. You were confused, hopefully @jamierocks has explained where you were confused and you no longer are confused, but just because you were confused doesn't mean there's a problem here or that anything needs to be changed. Anyone that actually needs to directly interact with this repo in any way is not confused by this.

cpw commented 5 years ago

Closing. The submitter is confused about what AccessTransformers is for. The examples are perhaps weak, but they are explanatory enough.