Skip to content

Update XSeries for newer Paper versions#129

Open
RobertoVillegas wants to merge 2 commits into
ChanceSD:masterfrom
RobertoVillegas:fix-xseries-paper-26
Open

Update XSeries for newer Paper versions#129
RobertoVillegas wants to merge 2 commits into
ChanceSD:masterfrom
RobertoVillegas:fix-xseries-paper-26

Conversation

@RobertoVillegas

Copy link
Copy Markdown

Summary

  • bump XSeries from 10.0.0 to 13.8.0
  • add JitPack so the newer XSeries artifact resolves
  • update XMaterial.supports calls for the current two-argument API

Testing

  • docker run --rm -v /Users/rob/Developer/AncientGates:/workspace -w /workspace maven:3.9.11-eclipse-temurin-17 mvn -DskipTests package


// LAVA
LAVA("stationary lava blocks", XMaterial.supports(13) ? Material.LAVA : Material.getMaterial("STATIONARY_LAVA")),
LAVA("stationary lava blocks", XMaterial.supports(13, 0) ? Material.LAVA : Material.getMaterial("STATIONARY_LAVA")),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Minecraft 13.0 does not exist. Also, XMaterial.supports is an internal API.

Comment thread pom.xml Outdated
Comment on lines +128 to +131
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This is not necessary. XSeries is available on Maven Central.

https://central.sonatype.com/artifact/com.github.cryptomorin/XSeries

…en Central

- Replace internal XMaterial.supports(major, minor) with the public
  XReflection.supports(int) API. The previous supports(13, 0) was wrong
  since it meant Minecraft 13.0; supports(13) correctly checks for 1.13+.
- Drop XSeries to 13.7.0 (latest published on Maven Central) and remove
  the jitpack.io repository, since XSeries is available on Central.
@RobertoVillegas

Copy link
Copy Markdown
Author

Thanks for the review @riku6460 — both points addressed in the latest commit:

  • Replaced the internal XMaterial.supports(...) with the public XReflection.supports(13) API (the previous supports(13, 0) was incorrect since it meant Minecraft 13.0; supports(13) correctly checks for 1.13+).
  • Removed the jitpack.io repository and pinned XSeries to 13.7.0, which is the latest version published on Maven Central. Verified it still parses Paper/MC 26.x correctly.

Built cleanly resolving XSeries from Maven Central only.

@riku6460

Copy link
Copy Markdown

note: 13.7.0 and 13.8.0 are identical. Only 13.7.0 appears to be available on Maven Central.

CryptoMorin/XSeries@v13.7.0...v13.8.0

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