Skip to content

fix: update x-backup for Minecraft 1.21.11#50

Merged
zly2006 merged 1 commit intozly2006:stonecutterfrom
ShawnNotFound:stonecutter
Jan 12, 2026
Merged

fix: update x-backup for Minecraft 1.21.11#50
zly2006 merged 1 commit intozly2006:stonecutterfrom
ShawnNotFound:stonecutter

Conversation

@ShawnNotFound
Copy link
Contributor

What changed

  • Updated mappings / dependencies for Minecraft 1.21.11
  • Verified build & basic functionality on Fabric 1.21.11

Tested

  • Backup creation
  • Restore (tested on single player and fabric server, restore completed, with some errors/cannot auto restart in some senarios. This does not seems to be a new error since pevious 1.21.x versions also have similar errors, luckily they does not affect basic functionality)

Notes

This PR only focuses on version compatibility, no behavior changes, there are some minor attempts on trying to fix the error mentioned above but only fixed a fraction of the problems.

Copilot AI review requested due to automatic review settings January 10, 2026 01:23
@ShawnNotFound ShawnNotFound changed the title 1.21.11 fix: update x-backup for Minecraft 1.21.11 Jan 10, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds support for Minecraft 1.21.11 by updating dependencies, mappings, and adapting to API changes in the new version. The changes focus on version compatibility while maintaining backward compatibility through conditional compilation using Stonecutter.

Key changes:

  • Updated Fabric Loom from 1.11-SNAPSHOT to 1.13.3 and added Gradle toolchain resolver plugin
  • Adapted to Minecraft 1.21.11 API changes: command manager method renaming, new permissions system, and chunk write synchronization
  • Refactored backup file handling in BackupDatabaseService to use temporary files, improving race condition handling

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
versions/1.21.11/gradle.properties New configuration file defining dependencies and mappings for Minecraft 1.21.11
stonecutter.gradle.kts Updated Fabric Loom version from 1.11-SNAPSHOT to 1.13.3 for 1.21.11 compatibility
settings.gradle.kts Added foojay-resolver-convention plugin for Java toolchain management and registered 1.21.11 version
src/main/kotlin/com/github/zly2006/xbackup/XBackup.kt Changed Json to json (referencing the json val), added ignoreUnknownKeys, and adapted command manager API with version-conditional code
src/main/kotlin/com/github/zly2006/xbackup/Utils.kt Added syncChunkWrites() call for 1.21.11+ to ensure chunks are written to disk
src/main/kotlin/com/github/zly2006/xbackup/Commands.kt Adapted permissions system to use DefaultPermissions API for 1.21.11+
common/src/main/kotlin/com/github/zly2006/xbackup/BackupDatabaseService.kt Refactored file backup logic to use temporary files with improved race condition handling and error recovery

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@zly2006
Copy link
Owner

zly2006 commented Jan 10, 2026

LGTM, Thank you so much! I will do some tests later.

@zly2006 zly2006 merged commit 4ebfeed into zly2006:stonecutter Jan 12, 2026
5 of 8 checks passed
@zly2006
Copy link
Owner

zly2006 commented Jan 12, 2026

你好,有没有兴趣处理一下自动重启的问题?应该只有服务端自动关闭,而客户端不会。现在客户端有bug。

@ShawnNotFound
Copy link
Contributor Author

您指的是单人模式restore之后游戏报错退出吗?

@zly2006
Copy link
Owner

zly2006 commented Jan 12, 2026

您指的是单人模式restore之后游戏报错退出吗?

是的

@ShawnNotFound
Copy link
Contributor Author

好的,我空了会尝试改一下,修复后我会pr回来
btw 这个pr的适配应该解决了 #49 的需求

@zly2006 zly2006 mentioned this pull request Jan 12, 2026
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.

3 participants