skyboy / MineFactoryReloaded

104 stars 76 forks source link

Not purposefully wasting your time but you have me stumped! #574

Closed LakMoore closed 7 years ago

LakMoore commented 7 years ago

unlocalizedName is private and cannot be accessed (is not visible to this class), so how is this compiling? gradle compiles the code without complaining but eclipse is not happy.

I have 24 similar issues to solve, some easy, some not easy but I would rather do it your way! :-)

LakMoore commented 7 years ago

Now I have fixed the build.gradle file I can confirm that gradle cannot compile the code as it is either! What am I missing? Thanks.

skyboy commented 7 years ago

What's missing is CoFHCore's AccessTransformer file: it rewrites accessibility of various fields and methods. I avoided calling getUnlocalizedName() in particular here because it prefixes an extra string onto the value that I did not want to needlessly remove again.

Also, you can open an issue without also creating a pull request. There's a "New Issue" button on this page: https://github.com/skyboy/MineFactoryReloaded/issues

LakMoore commented 7 years ago

Thank you. I didn't know AccessTransformers was a thing! Have managed to get a workspace working by giving gradle the CoFHCore AT but hiding the MFR AT from it.

The MFR AT changes canTriggerWalking() in Entity to public but EntityMinecart overrides canTriggerWalking() with a protected version of the method. If I leave the MFR AT in place I get errors about not being able to downgrade the access level (I understand why you cannot do that but how have you got around this compiler error).

Thanks for continuing to help me through my issues!

skyboy commented 7 years ago

I have a custom decompile setup to support it (and CoFHCore enables it for other's dev envrionments), if gradle will let you, running this https://github.com/skyboy/bearded-octo-nemesis/releases/download/1.3/BON.jar will correct for inheritance.

I execute it via ANT with these arguments:

        <java classpath="BON.jar" classname="immibis.bon.cui.MCPRemap">
            <arg  line="-q -m"/>
            <arg value="-to MCP"/>
            <arg value="-from SRG"/>
            <arg value="-mcp .gradle/caches/minecraft/net/minecraftforge/forge/${forge.version}/unpacked"/>
            <arg value="-in ${forge.jar}2"/>
            <arg value="-out ${forge.jar}"/>
            <arg value="-jref ${lib.dir}"/>
            <arg value="-at ${transformers.dir}"/>
        </java>

Note that the input and output file cannot be the same.


I've opened issues about getting similar functionality into forge but they reject it, so welcome to needing functionality not offered by forge I suppose. It's a fun place. Also, this kind of thing is why I don't use gradle myself, this way I'm actually able to get the functionality I need to make the things I want, but if you can get a functioning gradle build going that'd do quite a bit toward getting people able to easily make PRs.

LakMoore commented 7 years ago

Ummm... I think I have done it. Fairly steep learning curve but it seems to work.

The gradle script references the ant build fairly heavily but if you like what I have done I could keep working and perhaps replace it completely?

LakMoore commented 7 years ago

Have you had time to check this build script out? Boring ... I know! :-)

skyboy commented 7 years ago

The update to 1.10 brought with it a gradle script for setup