Skip to content

fix: commodore class remap on latest spigot versions#1535

Merged
derklaro merged 1 commit into
nightlyfrom
fix-commodore-remap
Oct 21, 2024
Merged

fix: commodore class remap on latest spigot versions#1535
derklaro merged 1 commit into
nightlyfrom
fix-commodore-remap

Conversation

@derklaro
Copy link
Copy Markdown
Member

Motivation

Spigot made a change to Commodore a few days ago (merged into paper yesterday) that made the Commodore#convert non-static. Therefore our current transformer for the class fails as it tries to return the slot 0 (which, when the method is static, is the first argument) which now is the Commodore instance.

Modification

Check if the method being transformed is static and return slot 0 in that case, if the method is not static return slot 1. In both constellations the first argument of the convert method, the raw input class bytes, is returned.

Result

Latest Spigot/Paper Services no longer crash due to a bad stack frame.

@derklaro derklaro added v: 4.X This pull should be included in the 4.0 release t: fix A pull request introducing a fix for a bug. in: wrapper An issue/pull request releated to the wrapper module code labels Oct 21, 2024
@derklaro derklaro added this to the 4.0.0-RC11.1 milestone Oct 21, 2024
@derklaro derklaro requested a review from 0utplay October 21, 2024 15:00
@derklaro derklaro self-assigned this Oct 21, 2024
@derklaro derklaro merged commit 8652ceb into nightly Oct 21, 2024
@derklaro derklaro deleted the fix-commodore-remap branch October 21, 2024 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in: wrapper An issue/pull request releated to the wrapper module code t: fix A pull request introducing a fix for a bug. v: 4.X This pull should be included in the 4.0 release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants