Skip to content

Conversation

@jchung01
Copy link

@jchung01 jchung01 commented Sep 27, 2024

Previous method was counting InvokeSpecial instructions, which break in Java 11+ because one of the instructions (EntityPlayer#isInBed) is instead compiled as an InvokeVirutal (See related question).
Fugue (a mod for Java 21+/Cleanroom to fix other mods) patches the AR transformer by looking for a specific LineNumberNode, but line numbers don't match between original AR and this fork. So this PR changes the way the position to inject code is found.

Slightly changes the injection point of the code, but should be functionally equivalent.
Original AR:

if (RocketInventoryHelper.allowAccess(this) &&
    !this.world.isRemote &&
    this.openContainer != null && 
    !this.openContainer.canInteractWith(this))

This PR:

if (!this.world.isRemote &&
    RocketInventoryHelper.allowAccess(this) &&
    this.openContainer != null &&
    !this.openContainer.canInteractWith(this))

Enable Advanced Rocketry Patch in fugue.cfg must be false until CleanroomMC/Fugue#58 is merged.
Fixes #27.

@jchung01
Copy link
Author

Actually, realized the Fugue PR should be enough to fix this. Will still leave this PR open if you want to merge it, as it should be more robust than the existing ASM code.

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.

[Bug]Error in Cleanroom Loader

1 participant