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

Build a Mojang mapped jar in addition to the reobf one, publish both to Modrinth with correct metadata #2981

Merged

Conversation

jpenilla
Copy link
Contributor

@jpenilla jpenilla commented Nov 9, 2024

Overview

Removes the need for remapping on Paper, reducing disk usage and first-start times.

Description

The project now builds two ShadowJars, one for Paper 1.20.5+ only (Mojmapped), and one that will work on Spigot or Paper for all versions (Spigot mapped).

We publish the Spigot jar to Modrinth twice to make sure their version selector picks the right jar for the platform regardless of the Minecraft version.

I've also added a runtime check on startup to notify the user when they have the wrong jar for their platform, tested with:

  • Mojmap jar on reobf Paper 1.20.4: throws useful error as expected
  • Spigot-mapped jar on mojmap Paper 1.20.4: "This FastAsyncWorldEdit version does not fully support your version of Bukkit" message, same as before this PR. Do we want to add more checks for this or should we just assume people running mojmap Paper <1.20.5 probably know what they are doing?
  • Mojmap jar on mojmap Paper 1.20.4: works normally
  • Mojmap jar on Paper 1.21.3: works normally
  • Spigot-mapped jar on reobf Paper 1.20.4: works normally
  • Spigot-mapped jar on Paper 1.21.3: works normally, logs warning as expected
  • Mojmap jar on Spigot 1.21.3: throws useful error as expected (mc version is less relevant for this test)
  • Spigot-mapped jar on Spigot 1.21.3: works normally (mc version is less relevant for this test)

I'm also wondering if it's intentional that 1.20.4 is not in the supported list for Modrinth publishing but 1.20.3 and 1.19.4 are. Let me know and I can adjust this if needed.

I've updated the GitHub Actions, not sure if Jenkins will need changes or not.

Submitter Checklist

  • Make sure you are opening from a topic branch (/feature/fix/docs/ branch (right side)) and not your main branch.
  • Ensure that the pull request title represents the desired changelog entry.
  • New public fields and methods are annotated with @since TODO.
  • I read and followed the contribution guidelines.

@jpenilla jpenilla requested a review from a team as a code owner November 9, 2024 00:00
@jpenilla jpenilla marked this pull request as draft November 9, 2024 00:10
@jpenilla jpenilla marked this pull request as ready for review November 9, 2024 00:30
@jpenilla jpenilla force-pushed the publish-mojang-jar-for-paper branch 2 times, most recently from 00deb25 to 9a34d9f Compare November 9, 2024 01:09
Copy link

Please take a moment and address the merge conflicts of your pull request. Thanks!

Copy link
Member

@SirYwell SirYwell left a comment

Choose a reason for hiding this comment

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

Looks good.

@SirYwell SirYwell requested a review from a team November 10, 2024 18:41
@SirYwell SirYwell linked an issue Nov 11, 2024 that may be closed by this pull request
@SirYwell SirYwell merged commit dcd6b93 into IntellectualSites:main Nov 14, 2024
10 checks passed
@NotMyFault NotMyFault added the Feature This PR adds a new feature label Nov 19, 2024
@jpenilla
Copy link
Contributor Author

@NotMyFault strange, I would try using the id instead of the name: z4HZZnLr

@NotMyFault
Copy link
Member

@NotMyFault strange, I would try using the id instead of the name: z4HZZnLr

Thanks for the pointer, where did you get the ID from?

@jpenilla
Copy link
Contributor Author

image
Modrinth has an option to copy the ID when clicking this icon with three dots

@NotMyFault
Copy link
Member

image Modrinth has an option to copy the ID when clicking this icon with three dots

Ah ok, thanks for the pointer! I was looking at the settings 👍

@NotMyFault
Copy link
Member

Screenshot 2024-11-24 at 19 51 03

This doesn't work either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature This PR adds a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mojang-mapped bukkit plugin version
4 participants