Update Slimefun4 for Minecraft 26.1.2 support#4351
Closed
Marc-Andrew1503 wants to merge 7 commits intoSlimefun:experimentalfrom
Closed
Update Slimefun4 for Minecraft 26.1.2 support#4351Marc-Andrew1503 wants to merge 7 commits intoSlimefun:experimentalfrom
Marc-Andrew1503 wants to merge 7 commits intoSlimefun:experimentalfrom
Conversation
- Introduce MinecraftVersion.MINECRAFT_26_1 so runtime detection no longer falls through to "unsupported" on 26.x servers. - Replace PaperLib.getMinecraftVersion()/getPatchVersion() in the startup check with an in-house parser that handles both 1.x.y and year.drop.hotfix strings. PaperLib 1.0.8 would otherwise return the drop number as the major (e.g. 1 for "26.1.2"), breaking every numeric comparison. - Drop the dead 1.20.2 ArmorStand consumer-spawn fallback. The raw PaperLib integer check misfires on 26.x, and the modern World#spawn overload has been available since 1.20.2. - Update api-version to '1.21', bump paper.version to 26.1.2, move the Java toolchain (main + tests) and Jitpack JDK to Java 25, and refresh the /sf versions Java notice. https://claude.ai/code/session_01UKMR6iJV5hc396vtW8C9Xb
- StartupWarnings.invalidMinecraftVersion now accepts a pre-formatted version string (String) instead of a raw majorVersion int. This prevents "Minecraft 1.26.x" being printed when the server actually runs 26.1.x. - Slimefun.isVersionUnsupported formats the display string at the call site: "26.1.x" for the new year-based scheme, "1.21.x" for legacy. - Add TestMinecraftVersion#testMinecraft26 covering isMinecraftVersion, isAtLeast, and isBefore correctness for the new MINECRAFT_26_1 value. https://claude.ai/code/session_01UKMR6iJV5hc396vtW8C9Xb
player.spigot().sendMessage(ChatMessageType.ACTION_BAR, BaseComponent[]) is marked @deprecated(forRemoval=true) in Paper 26.x and will throw a NoSuchMethodError at runtime once removed. Replace both call sites with the Adventure API equivalent: player.sendActionBar(LegacyComponentSerializer.legacySection() .deserialize(legacyColorString)) LegacyComponentSerializer handles the § color-coded strings that ChatColors.color() produces, so the visual output is identical. The old BungeeCord imports (ChatMessageType, BaseComponent, ComponentBuilder/TextComponent) are removed from both files. https://claude.ai/code/session_01UKMR6iJV5hc396vtW8C9Xb
com.mojang.authlib.GameProfile became final in Minecraft 26.1.2, so dough's CustomGameProfile (shaded into Slimefun) cannot be loaded and every PlayerSkin/PlayerHead call crashes with IncompatibleClassChangeError during plugin enable. Add PlayerSkinUtils using Paper's native PlayerProfile/PlayerTextures API and retarget every call site (SlimefunUtils, SlimefunItemStack, CapacitorTextureUpdateTask, DebugFishListener, ProgrammableAndroid, HeadTexture). Rewrite GitHubTask.pullTexture to fetch UUIDs and textures directly from the Mojang API instead of going through dough's PlayerSkin.fromPlayerUUID / UUIDLookup, which hit the same break.
The shaded dough library's MinecraftVersion.get() calls SemanticVersion.parse() on the first dash-separated component of Bukkit.getBukkitVersion(). For 26.1.2 that is "26.1.2.build.12" — a four-segment non-SemVer string that SemanticVersion.parse() rejects with IllegalArgumentException. This crashes ItemUtils.<clinit> and makes every ItemUtils call throw NoClassDefFoundError, breaking item loading entirely. Provide a patched replacement at io.github.bakedlibs.dough.versions that normalises the version string to its first three numeric dot-segments before construction. Handles both the classic "1.x.y-SNAPSHOT" format and the new "year.drop.hotfix.build.N-qualifier" format. The local source file is compiled and then patched into the dough-api jar so Maven Shade picks it up through the normal relocation pipeline. Also remove an unnecessary comment left in the shade filter block.
Contributor
|
Pro Tip!
If your changes do not fall into any of these categories, don't worry. You can just ignore this message in that case! 👀 |
|
slimefun is no longer being developed or maintained. it was officially abandoned 6 months ago |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Proposed changes
Related Issues (if applicable)
Checklist
NonnullandNullableannotations to my methods to indicate their behaviour for null values