PaperFixes
将 CraftBukkit、Spigot 和 Paper 中的错误修复与性能优化整合为一个 Forge 模组。
这是一款性能优化模组,可能会出现错误或兼容性问题。如果您发现任何问题,请在 GitHub 上提交 Issue。
当前修复与功能
错误修复
avoidItemMergeForFullStacks- 在边界框检查之前,跳过对满堆叠物品的合并检查。clearPacketQueue- 断开连接时清除玩家数据包队列,以防止内存泄漏。explosionsIgnoreDeadEntities- 爆炸效果排除已死亡实体和无法选中的玩家。fixMc54738(MC-54738) - 限制生物群系权重变量以修复地形尖刺问题。fixMc80966(MC-80966) - 确保空子区块向客户端发送数据。fixMc98153(MC-98153) - 防止在末地传送门中发生橡皮筋效应(被弹回)和窒息问题。fixMc133373(MC-133373) - 重置 NaN(非数字)属性值。fixShulkerDispenseCrash- 防止在高度限制处通过发射器放置非空的潜影盒时崩溃。fixShulkerDupe- 修复因潜影盒方块实体未移除而导致的物品复制问题。fixWaterMobSpawnCheck- 确保水生生物在有空间的区域内生成。dontOffloadBeaconColorUpdate- 避免信标更新时的不必要线程切换。handleNullTileCrashes- 记录空方块实体而不是引发更多问题。removeInvalidMobSpawners- 移除不存在的损坏刷怪笼。sortEnchantments- 按 ID 对附魔进行排序,以确保相同物品被视为一致。
客户端
-
cacheLastChunk- 由于 Minecraft 在一帧内多次从区块提供者访问同一个区块,我们可以缓存最后访问的那个。这通常对客户端影响不大,但在飞行并加载大量区块时,如果每个区块执行的操作较多,加载速度会稍快一些。 -
fastWorldBorder- 默认情况下在客户端(包括内部服务器)禁用,因为边框移动的动画无法正常工作,导致倒计时结束时边框直接瞬移到最终位置。如果您不介意这一点,可以为客户端和内部服务器启用世界边界缓存。
功能
-
spawnChunkGamerule- 启用spawnChunkRadius游戏规则。 允许您为世界或服务器定义出生点区块半径,类似于现代 Minecraft 的做法,但存在一些差异。在 Minecraft 1.12 中不存在区块票(chunk tickets),因此出生点区块是固定的 16×16 区域,始终处于加载和 ticking 状态。其中的实体仅在较小的 12×12 区域进行处理,因为实体 AI 需要 5×5 的加载区域。PaperFixes 使用一致的直径,即以包含出生点的区块为中心;而原版 Minecraft 如果出生点恰好位于区块中心,可能会变成 17×17。 将此游戏规则设置为0将完全禁用出生点区块。 -
spawnChunkRadius- 设置上述功能的默认出生点区块半径。仅适用于新世界或未运行过 PaperFixes 2.0.0-beta.1 或更高版本的旧世界。数值范围可从 0 到 32,其中 0 完全禁用出生点区块,32 则提供 64 个区块的直径。 -
improvedTickLoop- 使用纳秒而非毫秒来测量时间以提高准确性,使用LockSupport.parkNanos实现精确休眠,并根据 tick 长度调整睡眠时间。当服务器落后超过 2.5 秒时,尽可能快地运行 tick,而在下一个 tick 开始附近采用自旋(spinning)而非休眠,以避免过度休眠。 -
tickLoopSpinTime- 控制服务器 tick 循环自旋而非休眠的时间长度(以纳秒为单位)。也会影响循环在原本应为休眠时间的时段停止运行计划任务的时机。 -
runTasksDuringSleep- 允许 tick 循环在休眠期间运行计划任务,而不是空闲等待。 -
fastWorldBorder- 缓存世界边界的角点以加快计算速度,而不是每次都重新计算。
性能
-
ioThreadSleep- 控制世界保存线程的休眠时间。在 PaperFixes 中,默认情况下它完全不休眠,以避免罕见的内存和保存问题。如果启用,它将休眠 2 毫秒,而不是通常的 10 毫秒。除非有特定原因,否则建议保持禁用状态。 -
cacheBlockDensities- 缓存方块密度值,使爆炸无需重复检查相同的方块数据。 -
cacheLastChunk- 缓存每个 tick 内从区块提供程序访问的最后一个区块,避免重复查找。 -
compactLut- 使用更小、更快的查找表进行正弦和余弦计算。感谢 jellysquid3 和 ruViolence。 -
fastChests- 仅在需要时运行箱子打开/关闭动画,而不是每个 tick 都运行。 -
smartRegionRead- 一次性读取整个区域文件头,以加快世界加载速度并减少潜在问题。 -
fastEntityDataMap- 使用更快的哈希映射来存储和查找实体数据。 -
optimizePathfinding- 通过跳过重复或不可行的路径来改善寻路。 -
optimizedTaskQueue- 使用更快的队列实现来处理计划任务。 -
pathingChunkCache- 使用快速的一维缓存跟踪实体正在移动的区块。感谢 jellysquid3 和 ruViolence。 -
pathNodeCache- 保存寻路数据,避免重复重新计算相同的方块。感谢 jellysquid3 和 ruViolence。 -
queueChunkSaving- 随时间逐渐保存区块,而不是一次性全部保存,从而减少保存期间服务器的暂停时间。 -
trimRegionCache- 仅卸载使用率最低的区域,而不是一次性全部卸载,防止立即重新加载活动区域。 -
sharedRandomForEntities- 为所有实体使用共享随机数生成器,而不是为每个实体创建新的生成器。
已知不兼容项
- 改进的 tick 循环与 VintageFix 中的
mixin.bugfix.slow_tps_catchup选项不兼容(自提交 ecbc3e1 起已移除,且不再包含在最新版本中),以及与 Forged Carpet 的 tick 循环更改以及其他任何模组的可能更改不兼容。 - 糟糕的核心模组可能导致重入错误,并在游戏启动后立即崩溃。这不是 PaperFixes 的问题,而是不可避免的,因为这些模组过早地加载了游戏类。唯一的解决方案是用修复了这些问题的分支版本替换它们。
有问题的核心模组及其解决方案的不完整列表:- Quark:替换为 Quark: RoTN Edition(感谢 sahih_international 发现此方案)
PaperFixes
A collection of bug and performance fixes from CraftBukkit, Spigot, and Paper in a Forge mod.
This is a performance mod, and bugs and incompatibilities could occur. Please open a GitHub issue if you find any.
Current Fixes and Features
Bugfixes
avoidItemMergeForFullStacks- Skips merging checks for full item stacks before bounding box check.clearPacketQueue- Clears player packet queue on disconnect to prevent memory leaks.explosionsIgnoreDeadEntities- Excludes dead entities and untargetable players from explosions.fixMc54738(MC-54738) - Limits biome weight variable to fix terrain spikes.fixMc80966(MC-80966) - Ensures empty subchunks send data to clients.fixMc98153(MC-98153) - Prevents rubber-banding and suffocation in nether portals.fixMc133373(MC-133373) - Resets NaN attribute values.fixShulkerDispenseCrash- Prevents crash when placing non-empty shulker box via dispenser at height limit.fixShulkerDupe- Fixes duplication from shulker box tile entity not being removed.fixWaterMobSpawnCheck- Ensures water mobs spawn inside water with space.dontOffloadBeaconColorUpdate- Avoids unnecessary thread hopping for beacon updates.handleNullTileCrashes- Logs null tile entities instead of causing more problems.removeInvalidMobSpawners- Removes broken mob spawners that don't exist.sortEnchantments- Sorts enchantments by ID to ensure identical items are treated the same.
Client
-
cacheLastChunk- Because Minecraft accesses the same chunk from the chunk provider multiple times in one frame, we can cache the last one accessed. This doesn’t usually have a big effect on the client, but flying around and loading chunks can be a little faster when many operations are done per chunk. -
fastWorldBorder- Disabled on the client (including the internal server) by default because animations for border movement don’t work correctly, causing the border to snap to the end position when the countdown ends. If you don’t care about this, you can enable world border caching for the client and internal server.
Features
-
spawnChunkGamerule- Enables thespawnChunkRadiusgamerule. Lets you define a spawn chunk radius for your world or server, similar to modern Minecraft, but with a few differences. In Minecraft 1.12, chunk tickets didn’t exist, so spawn chunks are a fixed 16×16 section always loaded and ticked. Entities inside are only processed in a smaller 12×12 area, because entity AI requires a 5×5 loaded area. PaperFixes uses a consistent diameter by centering on the chunk containing spawn, unlike vanilla which can make it 17×17 if spawn is centered in a chunk. Setting this gamerule to0completely disables spawn chunks. -
spawnChunkRadius- Sets the default spawn chunk radius for the above feature. Applies only to new worlds or worlds not yet run with PaperFixes 2.0.0-beta.1 or newer. Values can range from 0 to 32, where 0 disables spawn chunks entirely and 32 gives a 64-chunk diameter. -
improvedTickLoop- Measures time in nanoseconds instead of milliseconds for better accuracy, usesLockSupport.parkNanosfor precise sleeps, and adapts sleep time depending on tick length. Runs ticks as fast as possible when the server is more than 2.5 seconds behind, spinning instead of sleeping near the start of the next tick to avoid oversleeping. -
tickLoopSpinTime- Controls how long (in nanoseconds) the server tick loop will spin instead of sleeping. Also affects when the loop stops running scheduled tasks during what would normally be sleep time. -
runTasksDuringSleep- Allows the tick loop to run scheduled tasks instead of idling during sleep periods. -
fastWorldBorder- Caches the corners of the world border to make calculations faster instead of recomputing them each time.
Performance
-
ioThreadSleep- Controls how long the world save thread sleeps. By default in PaperFixes, it doesn’t sleep at all to avoid rare memory and saving issues. If enabled, it sleeps for 2 ms instead of the usual 10 ms. Best left disabled unless you have a specific reason. -
cacheBlockDensities- Caches block density values so explosions don’t need to re-check the same block data repeatedly. -
cacheLastChunk- Caches the last chunk accessed from the chunk provider within a tick, avoiding repeated lookups. -
compactLut- Uses a smaller, faster lookup table for sine and cosine calculations. Thanks to jellysquid3 and ruViolence. -
fastChests- Runs chest open/close animations only when needed, instead of every tick. -
smartRegionRead- Reads the entire region file header at once for faster world loading and fewer potential issues. -
fastEntityDataMap- Stores and looks up entity data with a faster hash map. -
optimizePathfinding- Improves pathfinding by skipping repeated or impossible paths. -
optimizedTaskQueue- Uses a faster queue implementation for scheduled tasks. -
pathingChunkCache- Tracks the chunk an entity is moving through with a quick 1D cache. Thanks to jellysquid3 and ruViolence. -
pathNodeCache- Saves pathing data so the same blocks aren’t recalculated repeatedly. Thanks to jellysquid3 and ruViolence. -
queueChunkSaving- Saves chunks gradually over time instead of all at once, reducing server pause time during saves. -
trimRegionCache- Unloads only the least-used regions instead of all at once, preventing immediate reloading of active regions. -
sharedRandomForEntities- Uses a shared random number generator for all entities rather than creating a new one for each.
Known Incompatibilities
- The improved tick loop is not compatible with the
mixin.bugfix.slow_tps_catchupoption from VintageFix (removed as of commit ecbc3e1 and no longer in the latest release) and the tick loop changes from Forged Carpet and likely from any other mod. - Bad core mods can cause re-entry errors and crash the game as soon as it starts. This is not PaperFixes' fault and is
unavoidable because these mods are loading game classes too early. The only solution is to replace them with a fork
that fixes the problems.
An incomplete list of problematic core mods and solutions:- Quark: Replace with Quark: RoTN Edition (Thanks to sahih_international for finding this)
版本游戏版本平台发布时间本站下载
正式版
2.0.1
PaperFixes 2.0.1
1.12.2 Forge 1 年前 ·
0
1.12.2
Forge
1 年前
0
下载 PaperFixes
正式版
2.0.0
PaperFixes 2.0.0
1.12.2 Forge 1 年前 ·
0
1.12.2
Forge
1 年前
0
下载 PaperFixes
测试版
2.0.0-rc.2
PaperFixes 2.0.0 RC2
1.12.2 Forge 1 年前 ·
0
1.12.2
Forge
1 年前
0
下载 PaperFixes
正式版
1.3.1
PaperFixes 1.3.1
1.12.2 Forge 2 年前 ·
0
1.12.2
Forge
2 年前
0
下载 PaperFixes
正式版
1.3.0
PaperFixes 1.3.0
1.12.2 Forge 2 年前 ·
0
1.12.2
Forge
2 年前
0
下载 PaperFixes
正式版
1.2.0
PaperFixes 1.2.0
1.12.2 Forge 2 年前 ·
0
1.12.2
Forge
2 年前
0
下载 PaperFixes
正式版
1.1.0
PaperFixes 1.1.0
1.12.2 Forge 2 年前 ·
0
1.12.2
Forge
2 年前
0
下载 PaperFixes
正式版
1.0.1
PaperFixes 1.0.1
1.12.2 Forge 2 年前 ·
0
1.12.2
Forge
2 年前
0
下载 PaperFixes
正式版
1.0.0
PaperFixes 1.0.0
1.12.2 Forge 2 年前 ·
0
1.12.2
Forge
2 年前
0
下载 PaperFixes
测试版
0.4.3-BETA
PaperFixes 0.4.3-BETA
1.12.2 Forge 2 年前 ·
0
1.12.2
Forge
2 年前
0
下载 PaperFixes
2.0.1
正式版
2025-10-12
修复了因 dontOffloadBeaconColorUpdate 未正确重映射而导致的异常
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
Ixeris
decce6
缓冲的原始输入和线程化的事件轮询
优化
414
模组
玉Jade ?
Snownee
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
实用前置
339
模组
Fast Noise
omo50
原版世界生成优化模组
优化世界生成
242
模组
KubeJS
Lat
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
前置实用
239
模组
物品管理器Just Enough Items (JEI)
mezz
查看物品与配方
前置实用
239
模组
Xaero的小地图
thexaero
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
冒险交通
238
评论 0
登录后参与评分
还没有评论,来抢沙发吧