Skip to content

Make AR transformer compatible with fork version#58

Merged
kappa-maintainer merged 1 commit intoCleanroomMC:masterfrom
jchung01:ar-reworked-compat
Sep 27, 2024
Merged

Make AR transformer compatible with fork version#58
kappa-maintainer merged 1 commit intoCleanroomMC:masterfrom
jchung01:ar-reworked-compat

Conversation

@jchung01
Copy link
Copy Markdown
Contributor

See dercodeKoenig/AdvancedRocketry#37 for details. Made the transformer more specific to original AR, which means you don't need to disable the patch in the configs to get AR-Reworked ASM code to work.

@kappa-maintainer
Copy link
Copy Markdown
Collaborator

Does the new fork have some more obvious characteristics (like a new class)?
Identify it from opcodes seems not a good idea in long term

@jchung01
Copy link
Copy Markdown
Contributor Author

jchung01 commented Sep 27, 2024

The transformer class is actually identical (before changes in the linked PR) between original AR and AR-Reworked, but for some reason the line numbers were different. I couldn't figure out why though.

Identify it from opcodes seems not a good idea in long term

There would need to be exactly 2 ICONST_0/ICONST_1 instructions in this block of code, so I think it should be relatively safe from incorrect injection. As is, the LineNumber check actually causes a crash in AR-Reworked's transformer, so I don't think this would be any worse.

@kappa-maintainer
Copy link
Copy Markdown
Collaborator

Merge it for now, I will check this fork later

@kappa-maintainer kappa-maintainer merged commit e8263ac into CleanroomMC:master Sep 27, 2024
@jchung01
Copy link
Copy Markdown
Contributor Author

jchung01 commented Sep 27, 2024

Oh I should probably clarify, this is to make the Fugue transformer NOT apply to AR-Reworked's ASM code once the other PR is merged. So the way to identify is only to determine if regular AR is being used, it will skip patching on AR-Reworked.

EDIT: Now that I think of it, this should make Fugue compatible with the fork whether or not the other PR is merged. Fugue transformer applies without AR-Reworked PR, does not apply with.

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.

2 participants