跳到正文

HorizonSync

作者:soyCQ

A server side mod that allows synchronising player data across different Fabric servers.

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

HorizonSync

HorizonSync is a high-performance Fabric 1.21.1 mod designed to keep player data synchronized and secure using MongoDB. Whether you are running a single server looking for data redundancy or a network where player progress must be universal, HorizonSync ensures a seamless experience.

Features

Inventory & Equipment Sync: Full synchronization of the main inventory, armor, offhand items, and Ender Chest.

Experience & Stats: Your XP level, bar progress, health, food, and saturation stay exactly as you left them.

Potion Effects: Active status effects are automatically restored when a player joins the server.

High-Performance Persistence: Features a 3-minute asynchronous auto-save system and a synchronous “force-save” on server shutdown to prevent any data loss.

Mod Support

HorizonSync is built with deep integration for the most essential Fabric 1.21.1 APIs and mods:

Accessories API: Full synchronization of accessory slots and cosmetics.

Trinkets API: Complete support for all Trinkets slots.

Sophisticated Backpacks (Unofficial Fabric Port): All backpack contents are serialized and kept in sync.

How It Works

Unlike traditional methods, HorizonSync leverages MongoDB (NoSQL), allowing for extremely fast and flexible data writing:

On Join: Data is retrieved from the cloud and injected into the player via synchronized network packets.

During Gameplay: An asynchronous timer saves changes every 3 minutes without affecting the server’s TPS (Ticks Per Second).

On Leave/Shutdown: A final save is performed to ensure every last movement and item is recorded.

Getting Started
Installation: Place the HorizonSync .jar file into the mods folder of your Fabric 1.21.1 server.

MongoDB Configuration: Upon the first launch, a config file will be generated in the /config folder. Edit your MongoDB connection string (Local or Atlas) there.

Connection: Ensure your server’s IP is whitelisted in your database firewall.

Ready to Go: HorizonSync will automatically create the necessary collections and begin protecting your data.

Configuration Options
All settings are managed via the configuration file in the /config directory.

Database Settings
uri: Your MongoDB connection string (e.g., mongodb+srv://user:[email protected]/).

database: The name of the database (Default: horizonsync).

collection: The specific collection for player data (Default: playerdata).

FAQ

Q: Why use MongoDB instead of MySQL?
A: MongoDB allows for saving complex objects (like Item NBTs) much more efficiently, reducing lag when processing large or modded inventories.

Q: What happens if the server crashes?
A: Thanks to the 3-minute auto-save system, data loss is minimized. Players will only lose, at most, their last few minutes of progress.

Q: Is it compatible with Singleplayer?
A: HorizonSync is optimized for Dedicated Server environments. It is not recommended for local singleplayer worlds.

Q: Does it support items from other mods?
A: Yes. As long as a mod stores its data within the standard Minecraft NBT, HorizonSync will serialize and sync it correctly.

HorizonSync – Your data, always on the horizon, always secure.

常见问题

HorizonSync 支持哪些 Minecraft 版本?

HorizonSync 支持 Minecraft Java 版 1.21.1,可用的加载器:Fabric。下载时注意选择和你游戏版本一致的文件。

HorizonSync 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:仅服务端。

评论

登录后评论和评分

soyCQ 的其他作品

查看全部 →