Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It doesn't remap field and method name inside a method. #94

Open
heipiao233 opened this issue May 24, 2022 · 8 comments
Open

It doesn't remap field and method name inside a method. #94

heipiao233 opened this issue May 24, 2022 · 8 comments

Comments

@heipiao233
Copy link

Args: "in.jar out.jar mappings.tiny intermediary named --threads=8"

@heipiao233
Copy link
Author

Why not get field and method name from mappings, not classpath?

@burningtnt
Copy link

burningtnt commented Jan 28, 2023

I encountered the same problem when developing a mod named "Voxel Latest" to enable Voxelmap to work in minecraft 1.18 or higher.

Here is my command line: ["C:<hidden>\modDev\voxelremap 1.18.2\run\voxelmap\fabricmod_VoxelMap-1.10.15_for_1.17.0.jar", "C:<hidden>\modDev\voxelremap 1.18.2\run\voxellatest\remapped.jar", "C:<hidden>\modDev\voxelremap 1.18.2\run\voxellatest\yarn-1.17.tiny", "intermediary", "named", "--mixin"].

I promise that my .tiny file is not broken. But Tiny Remapper didn't remap any INVOKESTATIC or INVOKEVIRTUAL instructions.

For example, class_310.method_1551 is remapped into MinecraftClient.method_1551 instead of MinecraftClient.getInstance() I expected.

I'm not sure whether it is a Bug or a strange feature. Is there any Remapper which could correctly remap method name ?

My .tiny file is downloaded from "https://maven.fabricmc.net/net/fabricmc/yarn/1.17+build.13/yarn-1.17+build.13-tiny.gz".

Don't worry, I have already decompressed the gz file.

@sfPlayer1
Copy link
Collaborator

This is to be expected if you don't have at least Minecraft on the tr class path for analysis - mappings only have an effect if they target a class TR knows about.

@cph101
Copy link

cph101 commented Feb 17, 2024

This is to be expected if you don't have at least Minecraft on the tr class path for analysis - mappings only have an effect if they target a class TR knows about.

How would a person put minecraft on the classpath?

@burningtnt
Copy link

burningtnt commented Feb 17, 2024

Yes, it works. By the way, I found it work as well by directly invoking the methods inside and pass in the location of minecraft jar.

@cph101
Copy link

cph101 commented Feb 22, 2024

Which minecraft jar? The one generated by loom? or remappedClasspath.txt?? Neither seem to work

@burningtnt
Copy link

Which minecraft jar? The one generated by loom? or remappedClasspath.txt?? Neither seem to work

This depends on the namespace.

  • yarn -> intermediary: The minecraft jar in yarn namespace.
  • intermediary -> yarn: The minecraft jar in intermediary namespace.

@cph101
Copy link

cph101 commented Mar 1, 2024

Yes, it works. By the way, I found it work as well by directly invoking the methods inside and pass in the location of minecraft jar.

Just reread this. I’m not sure that it’s practical to directly invoke all the fields and methods from a mod I’m trying to decompile which has over a thousand different method calls, all on their own locally-defined variable though??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants