Async - Minecraft 实体多线程模组 ⚙️
Async 通过在多个 CPU 核心和线程上并行处理实体来提升实体性能。
重要提示❗
Async 目前处于 Alpha 测试阶段,属于实验性内容。使用它可能导致实体行为异常或崩溃。
什么是 Async??
Async 增强了实体处理的性能。该模组利用多线程技术,允许使用多个 CPU 核心来处理大量实体,从而提升性能。
? 主要优势:
- ⚡ 提升 TPS:即使在实体数量庞大的情况下,也能保持稳定的刻时间。
- ? 多线程:利用多个 CPU 核心并行处理实体。
- ? 异步随机刻(实验性功能):异步处理随机刻以获得更好的性能。
? 要求
- Minecraft: 26.1 或更高版本
- Java: 25 或更高版本
- 加载器: Fabric、Quilt 或 NeoForge
- 依赖项: Fabric API(在 Fabric/Quilt 上)
? 性能对比(9000 名村民)
| 配置 | TPS | MSPT |
|---|---|---|
| Lithium + Async | 20 | 41.8 |
| Lithium(无 Async) | 4.4 | 225.4 |
| Purpur | 5.72 | 176.18 |
?️ 测试配置
- 处理器: AMD Ryzen 9 7950X3D
- 内存: 64 GB(服务器分配 16 GB)
- Minecraft 版本: 1.21.4
- 实体数量: 9000
- 实体类型: 村民
模组列表
Concurrent Chunk Management Engine, Fabric API, FerriteCore, Lithium, ScalableLux, ServerCore, StackDeobfuscator, TT20 (TPS Fixer), Tectonic, Very Many Players, Fabric Carpet.⚠️ 不兼容的模组
- ❌ Moonrise - 已知不兼容
- ❌ Open Parties and Claims - 已知不兼容
- ⚠️ ...以及其他模组可能存在冲突。
如果您遇到与其他模组的兼容性问题,请在我们的 GitHub 或 Discord 上报告。
? 命令
配置
/async config toggle— 在游戏中启用或禁用模组(无需重启服务器)。使用此命令可立即查看 Async 如何改善您的服务器。/async config reload— 从磁盘重新加载配置文件。/async config setAsyncEntitySpawn [true|false]— 启用或禁用并行生物生成处理(默认禁用)。不带参数时显示当前值。警告:与 Carpet 模组的 lagFreeSpawning 规则不兼容。/async config setAsyncRandomTicks [true|false]— 启用或禁用异步随机刻处理(实验性功能,默认禁用)。不带参数时显示当前值。/async config synchronizedEntities— 列出当前在主线程上同步处理的实体。默认为minecraft:tnt、minecraft:item和minecraft:experience_orb。/async config synchronizedEntities add <entity|namespace:*>— 将实体类型或某个命名空间下的所有实体添加到同步处理中。/async config synchronizedEntities remove <entity|namespace:*>— 将实体类型或某个命名空间下的所有实体从同步处理中移除。
统计信息
/async stats— 显示模组状态、异步生成和随机刻状态、实体总数以及正在使用的线程数。/async stats entity— 显示每个世界中的实体数量,以及其中有多少是异步处理的。/async stats entity <number>— 此外,按降序显示前<number>(1-100)个实体类型的数量,并标记为async或sync。例如,/async stats entity 10显示数量最多的前 10 种实体类型。/async stats entity <number> <ticks>— 记录<ticks>刻的数据,然后显示前<number>个实体类型及其平均 mspt 使用情况。
⚙️ 配置文件
Async 也可以通过其配置文件进行配置:
disabled— 完全禁用模组。maxThreads— 使用的线程数。默认为-1(自动)enableAsyncSpawn— 并行生物生成处理。enableAsyncRandomTicks— 异步随机刻(实验性功能)。synchronizedEntities— 必须在线程主上进行刻处理的实体类型。
? 下载
该模组可在 Modrinth 获取
? Minecraft 版本支持
仅对最新版本的 Minecraft 提供完整支持。不支持旧版 Minecraft 快照。
? 反馈
我们用于收集反馈和错误报告的追踪器位于 GitHub:
您也可以在 Discord 上与我们聊天:
? 致谢
本模组基于 MCMTFabric 的代码,而 MCMTFabric 又基于 JMT-MCMT。衷心感谢 Grider 和 jediminer543 做出的宝贵贡献!
Async - Minecraft Entity Multi-Threading Mod ⚙️
Async improves entity performance by processing entities in parallel across multiple CPU cores and threads.
Important❗
Async is currently in alpha testing and is experimental. Its use may lead to incorrect entity behavior and crashes.
What is Async? ?
Async enhances the performance of entity processing. The mod leverages multithreading, which allows multiple CPU cores to improve performance when handling a large number of entities.
? Key Benefits:
- ⚡ Improved TPS: Maintains stable tick times even with a large number of entities.
- ? Multithreading: Utilizes multiple CPU cores for parallel entity processing.
- ? Async Random Ticks (Experimental): Processes random ticks asynchronously for better performance.
? Requirements
- Minecraft: 26.1 or newer
- Java: 25 or newer
- Loader: Fabric, Quilt or NeoForge
- Dependency: Fabric API (on Fabric/Quilt)
? Performance Comparison (9000 Villagers)
| Configuration | TPS | MSPT |
|---|---|---|
| Lithium + Async | 20 | 41.8 |
| Lithium (without Async) | 4.4 | 225.4 |
| Purpur | 5.72 | 176.18 |
?️ Test Configuration
- Processor: AMD Ryzen 9 7950X3D
- RAM: 64 GB (16 GB allocated to the server)
- Minecraft Version: 1.21.4
- Number of Entities: 9000
- Entity Type: Villagers
Mod List
Concurrent Chunk Management Engine, Fabric API, FerriteCore, Lithium, ScalableLux, ServerCore, StackDeobfuscator, TT20 (TPS Fixer), Tectonic, Very Many Players, Fabric Carpet.⚠️ Incompatible Mods
- ❌ Moonrise - Known incompatibility
- ❌ Open Parties and Claims - Known incompatibility
- ⚠️ ...and there may be conflicts with other mods.
If you encounter issues with other mods, please report them on our GitHub or Discord.
? Commands
Configuration
/async config toggle— Enables or disables the mod in-game (no server restart required). Use this command to instantly see how Async improves your server./async config reload— Reloads the configuration from disk./async config setAsyncEntitySpawn [true|false]— Enables or disables parallel mob spawn processing (disabled by default). Without an argument, shows the current value. Warning: Not compatible with Carpet mod lagFreeSpawning rule./async config setAsyncRandomTicks [true|false]— Enables or disables async random ticks processing (experimental feature, disabled by default). Without an argument, shows the current value./async config synchronizedEntities— Lists entities that are currently processed synchronously. Defaults tominecraft:tnt,minecraft:itemandminecraft:experience_orb./async config synchronizedEntities add <entity|namespace:*>— Adds an entity type, or every entity of a namespace, to synchronized processing./async config synchronizedEntities remove <entity|namespace:*>— Removes an entity type, or every entity of a namespace, from synchronized processing.
Statistics
/async stats— Displays mod status, async spawn and random tick states, the total entity count, and the number of threads in use./async stats entity— Shows the number of entities per world, along with how many of them are processed asynchronously./async stats entity <number>— Additionally shows the top<number>(1-100) entity types by count in descending order, each marked asasyncorsync. For example,/async stats entity 10displays the top 10 most numerous entity types./async stats entity <number> <ticks>— Records for<ticks>ticks, then displays the top<number>entity types with their average mspt usage.
⚙️ Configuration
Async can also be configured through its config file:
disabled— Fully disables the mod.maxThreads— Number of threads to use. Defaults to-1(auto)enableAsyncSpawn— Parallel mob spawn processing.enableAsyncRandomTicks— Async random ticks (experimental).synchronizedEntities— Entity types that must be ticked on the main thread.
? Download
The mod is available on Modrinth
? Minecraft Version Support
Full support is provided only for the latest version of Minecraft. Support for older Minecraft snapshots is not planned.
? Feedback
Our tracker for feedback and bug reports is available on GitHub:
You can also chat with us on Discord:
? Acknowledgements
This mod is based on code from MCMTFabric, which in turn was based on JMT-MCMT. Huge thanks to Grider and jediminer543 for their invaluable contributions!
下载 Async
下载 Async
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Async
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Async
下载 Async
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Async
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Async
下载 Async
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Async
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Async
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
? 新模组更新 ?
? 错误修复
- 修复了漏斗矿车因 Lithium 的共享实体移动追踪器中存在竞态条件而引发
IndexOutOfBoundsException导致崩溃的问题 - 修复了漏斗因在 Lithium 的实体移动追踪器中直接引用了 mixin-package 辅助类而导致
IllegalClassLoadError崩溃的问题 - 修复了异步生物生成与记分板队伍分配之间的竞态条件,该问题可能导致玩家队伍不同步并将其踢出服务器(Incendium)
- 修复了当最近物品、最近活体实体和最近玩家传感器触发时,猪灵和其他生物因
NoClassDefFoundError导致服务器崩溃的问题 - 修复了实体锁定和离线线程区块加载期间,计时池与服务器线程之间可能发生的服务器死锁
- 修复了启用异步随机刻时,
ServerLevel#tickChunk中关于共享随机状态的竞态条件 - 修复了区块部分锁定与 Lithium 的实体移动追踪锁定之间的锁定顺序死锁,该问题可能导致客户端冻结或断开连接
- 修复了 Lithium 的方块变化追踪器中的
IndexOutOfBoundsException竞态条件 - 修复了 Lithium 的方块变化追踪器中的锁定顺序反转死锁
- 修复了 Lithium 的方块变化追踪器中的
IllegalClassLoadError - 修复了可能导致计时线程停滞的区块等待争用超时问题
- 修复了 Lithium 的物品堆叠功能中
ItemEntityList的并发竞态条件 - 修复了通过下界传送门重新进入充满漏斗矿车的区块时的崩溃问题:现在矿车始终在主线程上运行刻
⚡ 变更
- 将 Accelerated Recoiling 标记为不兼容模组:它保持单线程实体碰撞状态,并行刻会破坏该状态,从而导致大量出现
IllegalStateException: Unbalanced section view release
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
一个用于收集生物掉落物的多区块模组。
模组
原版世界生成优化模组
模组
缓冲的原始输入和线程化的事件轮询
模组
一堆修复
模组
所有本应存在的事物
模组
为 Cobblemon 添加 Mega 进化、Z 招式、太晶化、超极巨化/超巨大化、究极爆击与融合!
评论 0
登录后参与评分
还没有评论,来抢沙发吧