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

weeds #8

Merged
merged 1 commit into from
Feb 17, 2022
Merged

weeds #8

merged 1 commit into from
Feb 17, 2022

Conversation

bombcar
Copy link
Member

@bombcar bombcar commented Feb 16, 2022

THIS NEEDS REVIEW!

By removing the obfuscation elvis/walrus it now loads and runs in dev AND prod.

But still not 100% certain that what I did is right.

@bombcar bombcar requested a review from a team February 16, 2022 22:40
@@ -108,7 +107,9 @@
case 1: {
CropLoadCoreASM.cppASMlogger.info("Patching WeedingTrowel to accept custom Weeds");
String name = "onItemUseFirst";
String desc = !isObfuscated ? "(Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/player/EntityPlayer;Lnet/minecraft/world/World;IIIIFFF)Z" : "(Ladd;Lyz;Lahb;IIIIFFF)Z";
//String desc = !isObfuscated ? "(Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/player/EntityPlayer;Lnet/minecraft/world/World;IIIIFFF)Z" : "(Ladd;Lyz;Lahb;IIIIFFF)Z";
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the actual real change, without this commented out, the whole thing blows up IC2 (apparently because it replaces a deobfuscated name with an obfuscated one)

Copy link

@Glease Glease left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Class names are deobfuscated regardless of environment. Using deobfuscated names never fails.

@bombcar
Copy link
Member Author

bombcar commented Feb 17, 2022

Class names are deobfuscated regardless of environment. Using deobfuscated names never fails.

So the other if/then weren’t needed either?

@Glease
Copy link

Glease commented Feb 17, 2022

Method name checks are needed. Method desc checks are not needed.

@repo-alt
Copy link

That of is course better be changed to mixin, because we have both ASM and mixins transforming TileCrop. (It's not impossible that this combination leads to crops breaking on Thermos). Anyway, this PR is ok, thanks for investigating the issue.

@Dream-Master Dream-Master merged commit a8dcd80 into master Feb 17, 2022
@draknyte1
Copy link

Method name checks are needed. Method desc checks are not needed.

They are if you’ve got multiple methods with the same name. Class names are obfuscated outside of dev, just depends when your ASM runs.

@Glease
Copy link

Glease commented Feb 17, 2022

just depends when your ASM runs.

Yeah, but the situation here is, croploadcore is trying to create a new invokestatic instruction instead of looking for an existing instruction. It doesn't care if deobf transformer has ran or not. At the end of transformation pipeline it'll always be deobfuscated, so it doesn't really matter if obfuscated names or deobf names are written.

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

Successfully merging this pull request may close these issues.

5 participants