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

static import on vanilla class breaks sources jar on non-official mappings #9632

Closed
noeppi-noeppi opened this issue Jul 9, 2023 · 0 comments · Fixed by #9633
Closed

static import on vanilla class breaks sources jar on non-official mappings #9632

noeppi-noeppi opened this issue Jul 9, 2023 · 0 comments · Fixed by #9633
Labels
1.20 Bug This request reports or fixes a new or existing bug. Confirmed This request has been verified to be factually correct by at least one member of the team.

Comments

@noeppi-noeppi
Copy link
Contributor

Minecraft Version: 1.20.1

Forge Version: 47.1.0

Description of issue:

ForgeLoadingOverlay.java uses a static import on a vanilla class (import static net.minecraft.util.Mth.clamp;). Since Srg2Source does not support static imports (see MinecraftForge/Srg2Source#28), this is not properly renamed to a SRG name.

Because of this, the published forge sources-jar (https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.1-47.1.0/forge-1.20.1-47.1.0-sources.jar), which should contain everything remapped to SRG won't have this import remapped.

This causes a recompile error when using mappings other than official, as the methods are still named clamp instead of their actual name in the used mapping set.

Proposed solution

Get rid of the static import in ForgeLoadingOverlay.java and write it out as Mth.clamp, so that Srg2Source can properly rename it to its SRG name.

@noeppi-noeppi noeppi-noeppi added the Triage This request requires the active attention of the Triage Team. Requires labelling or reviews. label Jul 9, 2023
@AterAnimAvis AterAnimAvis added Bug This request reports or fixes a new or existing bug. Confirmed This request has been verified to be factually correct by at least one member of the team. 1.20 labels Jul 10, 2023
@autoforge autoforge bot removed the Triage This request requires the active attention of the Triage Team. Requires labelling or reviews. label Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.20 Bug This request reports or fixes a new or existing bug. Confirmed This request has been verified to be factually correct by at least one member of the team.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants