跳到正文

AttributeFix-Sync

作者:i113w

Syncs AttributeFix limits from server to client.

收藏

介绍

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

AttributeFix Sync

License
NeoForge

AttributeFix Sync is an unofficial addon for the AttributeFix mod, designed to solve the synchronization issue where modified attribute limits on the server are not reflected on the client.

The Problem

In the original AttributeFix, if you modify the upper limit of an attribute (e.g., generic.max_health or generic.attack_damage) in the server configuration:

  1. The Server correctly calculates damage and health based on your config (e.g., capped at 5000).
  2. The Client still uses the default limit (e.g., 1,000,000).
  3. Result: Mods like Jade, WTHIT, or the vanilla health bar display incorrect values because the client isn’t aware of the stricter limit enforced by the server.

Features

This mod solves the above problem via packet synchronization:

  • Automatic Synchronization: When a player joins the server, the mod automatically sends all attribute limits (Max Values) configured on the server to the client.
  • In-Memory Patching: Upon receiving the data, the client dynamically modifies the attribute definitions in memory via Mixin.
  • Correct Visualization: Jade, WTHIT, and vanilla bars will now correctly display values based on the actual server limits.
  • Pollution-Free: When the player disconnects, the mod automatically restores the client’s attribute limits to their original state, ensuring single-player worlds or other servers are not affected.

Installation & Usage

Dependencies

  • Minecraft: 1.21.1
  • Loader: NeoForge
  • Required Mod: AttributeFix

Usage

  1. Server: Required. No configuration needed. It automatically reads the final values from AttributeFix and sends them to players.
  2. Client: Required. Necessary to receive the synchronization packets.

Configuration

The client configuration file can be found at config/attributefixsync-client.toml.

Option Default Description
enableSync true Whether to accept attribute limit synchronization from the server.
showSyncMessages true Whether to show a chat message when attributes are synchronized.

Note: To change the actual attribute limits (e.g., max health), please edit the AttributeFix config files located in config/attributefix/.

License & Credits

This project is licensed under the MIT License.

  • Core logic is based on the Minecraft NeoForge API.
  • Special thanks to Darkhax for developing the original AttributeFix mod. This mod exists solely as a supplementary tool for it.

This is not an official work by Darkhax. If you have issues related to synchronization, please report them to this repository, not the original author.

常见问题

AttributeFix-Sync 支持哪些 Minecraft 版本?

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

AttributeFix-Sync 怎么安装?

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

评论

登录后评论和评分

i113w 的其他作品

查看全部 →