PaperFixes
PaperFixes is a Forge mod that combines numerous bug fixes and performance optimizations borrowed from CraftBukkit, Spigot, and Paper. This mod aims to enhance game stability and speed, but it's important to note that it may cause incompatibilities with other mods. If you encounter issues, report them via GitHub.
Bug Fixes
- avoidItemMergeForFullStacks — Skips merge checks for fully filled item stacks before boundary verification.
- clearPacketQueue — Clears the player's packet queue upon disconnection to prevent memory leaks.
- explosionsIgnoreDeadEntities — Excludes dead entities and untargetable players from explosion effects.
- fixMc54738 — Limits the biome weight variable to fix terrain spikes.
- fixMc80966 — Ensures empty subchunks send data to clients.
- fixMc98153 — Prevents rubber-banding and suffocation in Nether portals.
- fixMc133373 — Resets attribute values that are NaN.
- fixShulkerDispenseCrash — Prevents crashes when placing non-empty shulker boxes via dispensers at the height limit.
- fixShulkerDupe — Fixes duplication caused by unremoved shulker box tile entities.
- fixWaterMobSpawnCheck — Ensures water mobs spawn inside water with sufficient space.
- dontOffloadBeaconColorUpdate — Avoids unnecessary thread switching for beacon updates.
- handleNullTileCrashes — Logs null tile entities instead of causing further issues.
- removeInvalidMobSpawners — Removes broken mob spawners that do not exist.
- sortEnchantments — Sorts enchantments by ID to ensure identical items are treated the same.
Client Improvements
- cacheLastChunk — Caches the last processed chunk, speeding up chunk loading during flight.
- fastWorldBorder — Disabled on the client by default due to world border animation issues. Can be enabled if animations are not important.
Additional Features
- spawnChunkGamerule — Adds the
spawnChunkRadiusgame rule, allowing you to set the spawn chunk radius. Unlike the vanilla system, it uses an even diameter centered on the spawn chunk. Setting it to0completely disables spawn chunks. - spawnChunkRadius — Sets the default spawn chunk radius for new worlds (from 0 to 32).
- improvedTickLoop — Uses nanoseconds for precise time measurement, adaptively adjusts sleep time, and speeds up processing when the server is behind.
- tickLoopSpinTime — Controls the spin time of the tick loop instead of sleep (in nanoseconds).
- runTasksDuringSleep — Allows scheduled tasks to run during sleep periods.
- fastWorldBorder — Caches world border corners to speed up calculations.
Performance Optimizations
- ioThreadSleep — Controls the sleep of the world save thread. By default, sleep is disabled to avoid rare memory issues.
- cacheBlockDensities — Caches block density values for explosions.
- cacheLastChunk — Caches the last accessed chunk within a tick.
- compactLut — Uses a compact lookup table for sine and cosine calculations.
- fastChests — Runs chest open/close animations only when needed.
- smartRegionRead — Reads the entire region header at once to speed up world loading.
- fastEntityDataMap — Uses a fast hash map for entity data.
- optimizePathfinding — Improves pathfinding by skipping repeated or impossible routes.
- optimizedTaskQueue — Implements a faster queue for scheduled tasks.
- pathingChunkCache — Tracks the entity's movement chunk with a quick cache.
- pathNodeCache — Saves pathfinding data to avoid repeated calculations.
- queueChunkSaving — Saves chunks gradually to reduce pause times during saves.
- trimRegionCache — Unloads the least used regions instead of all at once.
- sharedRandomForEntities — Uses a shared random number generator for all entities.
Known Incompatibilities
The improved tick loop is incompatible with the mixin.bugfix.slow_tps_catchup option from VintageFix (removed in recent versions) and tick loop changes in Forged Carpet, and likely with other mods.
Some core mods may cause re-entry errors and crashes upon startup. This is due to premature loading of game classes. It is recommended to replace problematic mods with fixed versions, such as Quark with Quark: RoTN Edition.