Mark chunks that are blocking main thread for world generation as urgent
Implements a general priority system so that chunks that are sorted in
the generator queues can prioritize certain chunks over another.
Urgent chunks will jump to the front of the line, ensuring that a
sync chunk load on an ungenerated chunk does not lag the server for
a long period of time if the servers generator queues are filled with
lots of chunks already.
This massively reduces the lag spikes from sync chunk gens.
Then we further prioritize loading order so nearby chunks have higher
priority than distant chunks, reducing the pressure a high no tick
view distance holds on you.
Chunks in front of the player have higher priority, to help with
fast traveling players keep up with their movement.
This commit also improves single core cpu scenarios in that we will
now automatically disable Async Chunks as well as Minecrafts thread
pool.
It is never recommended to use async chunks on a single CPU as context
switching will be slower than just running it all on main.
This also bumps the number of server worker threads by default too.
Mojang does not utilize the workers in an effecient manner, resulting
in them using barely any sustained CPU.
So give it more workers so more chunks can be processed concurrently
This change also improves urgent chunk loading, so players flying into
unloaded chunks will hurt a little bit less (but still hurt)
Ping #3395#3363 (Not marking as closed, we need to make prevent moving work)
This commit doesn't do much on its own, but adds a new Java Cleaner API
that lets us hook into Garbage Collector events to reclaim pooled objects and
return them to the pool.
Adds framework for Network Packets to know when a packet has finished dispatching
to get an idea when a packet is done sending to players.
Rewrites PooledObjects impl to properly respect max pool size and remove
almost all risk of contention.
Bumps the Paper Async Task Queue to use 2 threads, and properly shuts it down on shutdown.
This patch replaces the vanilla collision code for both block and entity collisions with faster implementations by JellySquid, used originally in her Lithium mod.
Optimizes Full Block voxel collisions, and removes streams from Entity collisions
Original code by JellySquid, licensed under GNU Lesser General Public License v3.0
you can find the original code on https://github.com/jellysquid3/lithium-fabric/tree/1.15.x/fabric (Yarn mappings)
Ported by
Co-authored-by: Zoutelande <54509836+Zoutelande@users.noreply.github.com>
Touched up by Aikar to keep previous paper optimizations
Undo the accidental renaming of a method in 0aad8bf
Aikar wanted to rename DataPalette#getDataBits(T object) to getOrCreateIdFor
in 0aad8bf but he also accidentally renamed
ChunkPacketInfo#getDataBitsIndex(int chunkSectionIndex) to
getOrCreateIdForIndex.
Remove chunk-edge-mode and chunk loading entirely from Anti-Xray
The chunk-edge-mode is broken since several versions.
Loading chunk neighbors for chunk edge obfuscation isn't needed anymore.
Unlike in previous versions, these are under normal circumstances already loaded
at the time we need them (plugins for example can bypass this).
Use the modified methods and constructors everywhere
Anti-Xray provides support for the default nms methods and constructors,
which where modified by Anti-Xray to avoid breaking stuff (plugins)
which somehow uses these methods.
However, the modified versions of those methods and constructors should be used
where possible.
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
Bukkit Changes:
b999860d SPIGOT-2304: Add LootGenerateEvent
CraftBukkit Changes:
77fd87e4 SPIGOT-2304: Implement LootGenerateEvent
a1a705ee SPIGOT-5566: Doused campfires & fires should call EntityChangeBlockEvent
41712edd SPIGOT-5707: PersistentDataHolder not Persistent on API dropped Item
We still keep vanilla process of waiting for existing session to be removed before logging in
by storing a separate map of pending.
also fire the callback using executor incase further recursion causes any trouble
The streams hurt performance and allocate tons of garbage, so
replace them with the standard iterator.
Also optimise the stream.anyMatch statement to move to a bitset
where we can replace the call with a single bitwise operation.
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
Bukkit Changes:
7361a62e SPIGOT-5641: Add Block.getDrops(ItemStack, Entity)
1dc91b15 Add specific notes about what is not API
2b05ef88 #484: Allow statistics to be accessed for offline players
CraftBukkit Changes:
f7d6ad53 SPIGOT-5603: Use LootContext#lootingModifier in CraftLootTable
5838285d SPIGOT-5657: BlockPlaceEvent not cancelling for tripwire hooks
f325b9be SPIGOT-5641: Add Block.getDrops(ItemStack, Entity)
e25a2272 Fix some formatting in CraftHumanEntity
498540e0 Add Merchant slot delegate
b2de47d5 SPIGOT-5621: Add missing container types for opening InventoryView
aa3a2f27#645: Allow statistics to be accessed for offline players
2122c0b1#649: CraftBell should implement Bell
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
Bukkit Changes:
122289ff Add FaceAttachable interface to handle Grindstone facing in common with Switches
a6db750e SPIGOT-5647: ZombieVillager entity should have getVillagerType()
CraftBukkit Changes:
bbe3d58e SPIGOT-5650: Lectern.setPage(int) causes a NullPointerException
3075579f Add FaceAttachable interface to handle Grindstone facing in common with Switches
95bd4238 SPIGOT-5647: ZombieVillager entity should have getVillagerType()
4d975ac3 SPIGOT-5617: setBlockData does not work when NotPlayEvent is called by redstone current
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
Bukkit Changes:
6148fca7 SPIGOT-5484: Add more spawn tick settings
CraftBukkit Changes:
fc249340 SPIGOT-5484: Add more spawn tick settings
Spigot Changes:
6de3d4be Rebuild patches
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
CraftBukkit Changes:
7f61a252#640: Fix chunk load/unload callbacks for chunk load cancellations
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
Bukkit Changes:
f52c70ab Fix incorrect nullability in MultipleFacing
6af4c0b2 SPIGOT-5311: Add API to get/set item associated with throwable projectiles
97aeae56 Add set/isAware to disable Vanilla AI components of a Mob
CraftBukkit Changes:
fba9f487 Improve legacy conversion of some materials that changed post flattening
b1ba8749 Move Bukkit.Aware loading/saving to correct location
f7cdb53c SPIGOT-5311: Add API to get/set item associated with throwable projectiles
689f429c#634: Cross platform patch scripts
ab85433d Add set/isAware to disable Vanilla AI components of a Mob
Spigot Changes:
8faa8b45 Rebuild patches
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
Bukkit Changes:
93e39ce1 Clarify documentation regarding getMaterial with legacyName = true
c3aeaea0 Improve dependency tracker
14c9d275 Add support for transitive depends in load access warning
c8afe560 SPIGOT-5526: Add EntityEnterBlockEvent
6bb6f07d SPIGOT-5548: Show error that hints towards plugins misusing reflection
ed75537d SPIGOT-5546: Fix bad depend access using wrong provider in message
4e4c0ee9 Fix buggy classloader warning triggering for all classes
89586a4c Print warning when loading classes from depends that have not been specified
d4fe9680 Fix bug where disablePlugin could remove ConfigurationSerializable classes from other plugins
85e683b7 Add additional checkstyle checks
612fd8e1 Correct max page count in BookMeta docs
fa8a9781 Correct max title length in BookMeta docs
CraftBukkit Changes:
ab13a117 SPIGOT-5550: Cancelled ProjectileLaunchEvent still plays sound for eggs
44016b1d SPIGOT-5538: Using javaw to run GUI prints input error
e653ae76 SPIGOT-5526: Call EntityEnterBlockEvent for bees trying to enter hives
6515ea49 SPIGOT-5537: Bee nests generated by growing trees near flower have no bees
d82b3149 Remove unused CraftWorld.getId method
10763a88 Change some block == AIR checks to isAir to catch CAVE_AIR
Spigot Changes:
f2c1cd15 Rebuild patches
bcd458ad Reformat patches
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
Bukkit Changes:
bf1fa3e3 Update to Minecraft 1.15.1
CraftBukkit Changes:
30a1b691 Update to Minecraft 1.15.1
e2790ae2 Remove outdated build delay.
Spigot Changes:
2ee05fef Update to Minecraft 1.15.1
They are MT-Safe already. These changes reduce deadlock chances
given these calls are used in Entity#isValid(), and plugins
check this in packet handling...
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
Bukkit Changes:
3dc4cdcd Update to Minecraft 1.14.3-pre4
88b25a8c SPIGOT-5098: Add a method to allow colored sign changes
6d913552 Update to Minecraft 1.14.3-pre4
CraftBukkit Changes:
f1f33559 Update to Minecraft 1.14.3
8a3d3f49 SPIGOT-5098: Add a method to allow colored sign changes
533290e2 SPIGOT-5100: Console warning from pig zombie targeting
6dde4b9f SPIGOT-5094: Allow opening merchant for wandering traders and hide the xp bar for custom merchants
9af90077 SPIGOT-5097: Bukkit.clearRecipes() no longer working
38fa220f Fix setting game rules via the API
fe3930ce Update to Minecraft 1.14.3-pre4
da071ec5 Remove outdated build delay.
Spigot Changes:
4d2f30f1 Update to Minecraft 1.14.3
f16400e3 Update to Minecraft 1.14.3-pre4
* Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
Bukkit Changes:
45690fe9 SPIGOT-5047: Correct slot types for 1.14 inventories
CraftBukkit Changes:
4090d01f SPIGOT-5047: Correct slot types for 1.14 inventories
e8c08362 SPIGOT-5046: World#getLoadedChunks returning inaccessible cached chunks.
d445af3b SPIGOT-5067: Add item meta for 1.14 spawn eggs
* Bring Chunk load checks in-line with spigot
As of the last upstream merge spigot now checks ticket level status
when returning loaded chunks for a world from api. Now our checks
will respect that decision.
* Fix spawn ticket levels
Vanilla would keep the inner chunks of spawn available for ticking,
however my changes made all chunks non-ticking. Resolve by changing
ticket levels for spawn chunks inside the border to respect this
behavior.
* Make World#getChunkIfLoadedImmediately return only entity ticking chunks
Mojang appears to be using chunks with level > 33 (non-ticking chunks)
as cached chunks and not actually loaded chunks.
* Bring all loaded checks in line with spigot
Loaded chunks must be at least border chunks, or level <= 33
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
CraftBukkit Changes:
17543ecf SPIGOT-5035: Error Using Virtual Merchant GUI
0fc6922b SPIGOT-5028: Villager#setVillagerExperience() doesn't work
bdbdbe44 SPIGOT-5024: Fox error - Unknown target reason
There is an artificial delay added to chest close sounds (of 10 ticks)
to make them "feel" more true to vanilla. The problem is that because of
this delay it is possible for the block to be removed by the time the
sound plays.
With 1.14 in the state it is the timing necessary to encounter this
issue has increased.
The correct fix is to just return early if the property checked for in
the TileEntityChest sound method does not exist for the block at the
current location.
Fixes GH-2074
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
CraftBukkit Changes:
17da3420 Fix reading custom persistent entity data
83783357 SPIGOT-4980: Shields will not be put on cooldown when hit with an axe
8d0f3722 SPIGOT-4752: Fixed inconsistency between isChunkLoaded and chunk load/unload events
3f9f31c3 SPIGOT-4982: Armor disappearing while breaking the armor stand