Upstream has released updates that appear 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:
5b747147e Increase outdated build delay
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
Actually rebuild patches this time...
Bukkit Changes:
19b7b7bd #561: Add clear weather World API
5929c808 #552: Add the ability to retrieve hit, step, fall, and other sounds from blocks.
CraftBukkit Changes:
e1ebdd92 #771: Add clear weather World API
424598d2 #752: Add the ability to retrieve hit, step, fall, and other sounds from blocks.
Upstream has released updates that appear 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:
19b7b7bd #561: Add clear weather World API
5929c808 #552: Add the ability to retrieve hit, step, fall, and other sounds from blocks.
CraftBukkit Changes:
e1ebdd92 #771: Add clear weather World API
424598d2 #752: Add the ability to retrieve hit, step, fall, and other sounds from blocks.
* Preserve order of hidden-blocks in Anti-Xray
This small change allows to specify and predict the order in which
Anti-Xray uses the hidden-blocks in engine-mode 2. The order is
preserved as specified in the hidden-blocks list. This can be useful,
for example, when adding air to the hidden-blocks to predict which fake
ores should be exposed to fake air.
* Allow to add equal blocks multiple times to hidden-blocks
This adds the ability to add equal blocks multiple times to the
hidden-blocks of Anti-Xray in engine-mode 2. Thus it is possible to give
certain blocks different priorities in Anti-Xray. For example if air and
diamond_ore are added twice, the obfuscated chunk will contain twice as
many air and diamond_ore blocks as other blocks in the list.
This patch implements a noise cache for the end which significantly reduces the computation time of generation. This results in about a 3x improvement.
Original code by SuperCoder7979 and Gegy in Lithium, licensed under LGPL-3.0 (Source: https://github.com/jellysquid3/lithium-fabric)
Co-authored-by: Gegy <gegy1000@gmail.com>
Co-authored-by: Dylan Xaldin <Puremin0rez515@gmail.com>
Co-authored-by: pop4959 <pop4959@gmail.com>
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:
f47abd88 SPIGOT-6242: Fix some file line endings
de96535b SPIGOT-6234: enum classes don't serialize properly when implementing ConfigurationSerializable
CraftBukkit Changes:
4475707d SPIGOT-6244: /spawnpoint ignores angle
8b3b096d SPIGOT-6242: Fix some file line endings
4b33c749 SPIGOT-6186: Canceling a CreatureSpawnEvent results in a "Unable to summon entity due to duplicate UUIDs" error
2b3ca726 SPIGOT-6236: Vehicle passenger portal cooldown does not change
The following has been tested:
- Disconnect from menu -> DISCONNECTED
- EssentialsX kick -> KICKED
- Suspend server JVM -> DISCONNECTED
- Suspend client JVM -> TIMED_OUT
- Call #exceptionCaught -> ERRONEOUS_STATE
Suspension was done through `kill -STOP` and subsequently `kill -CONT`
after the player has (been) disconnected.
Closes#254.
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:
23618b2c SPIGOT-6240: Use correct portal search radius
Adds 3 methods to the Beacon block state to set a custom range for the beacon.
One to set the range, one to get the range, and one to reset the range
(aka go back to using the default range-by-beacon-tier system).
When new advancements are added via the UnsafeValues#loadAdvancement
API, it triggers a full datapack reload when this is not necessary. The
advancement is already loaded directly into the advancement registry,
and the point of saving the advancement to the Bukkit datapack seems to
be for persistence. By removing the call to reload datapacks when an
advancement is loaded, the client no longer completely freezes up when
adding a new advancement.
To ensure the client still receives the updated advancement data, we
manually reload the advancement data for all players, which
normally takes place as a part of the datapack reloading.
Restab at the last upstream to add support for migrating the option for disabling player data
saving back into spigots config, vs blindly dropping it
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
Spigot Changes:
a19903d2 SPIGOT-520: Add option to disable player data saving
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
Spigot Changes:
a19903d2 SPIGOT-520: Add option to disable player data saving
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:
f4f2ef4c SPIGOT-6222: Correct javadoc for Entity#setPassenger
1871ca9d #559: Add wait time modification for FishHook
CraftBukkit Changes:
bc6a175e #767: Add wait time modification for FishHook
2fc37bcc SPIGOT-6197: Prevent world loading from updating spawn settings of all worlds
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:
3eb7236e4 SPIGOT-6217: Missed PlayerEditBookEvent when editing books
Spigot Changes:
37d799b2 SPIGOT-6218: Player.spigot().sendMessage(UUID, BaseComponent...) does not work
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:
eda400d3 SPIGOT-6213: MinecraftFont.getWidth(" ") returns 2 when it should be 3
Spigot Changes:
aa477927 #100: Allow sending messages from specific UUIDs
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:
ce64c84ca SPIGOT-6205: Rewrite enum to/from NMS type methods
dd10b375c Downgrade NMS revision
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:
30885166 Update to Minecraft 1.16.4
CraftBukkit Changes:
3af81c71 Update to Minecraft 1.16.4
Spigot Changes:
f011ca24 Update to Minecraft 1.16.4
Co-authored-by: Mariell Hoversholm <proximyst@proximyst.com>
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:
4abf9e96 #557: Add TNTPrimed#setSource method
CraftBukkit Changes:
dea41389 Remove outdated build delay.
9da3b5bf #762: Add TNTPrimed#setSource method
Fixes hasKey to check that a key actually exists, while retaining the
option to scream at keys which are requested which haven't been marked as
needing to be copied
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:
01e22e09 Misc maven build updates
746f5324 #556: Allow sending messages from specific UUIDs
92b99cde #501: Add PersistentDataHolder to Chunk
CraftBukkit Changes:
4ef13f94 Misc maven build updates
04639f5a #759: Allow sending messages from specific UUIDs
77c894a2 #672: Add PersistentDataHolder to Chunk
Spigot Changes:
57bbdd8e Rebuild patches
Co-authored-by: Shane Freeder <theboyetronic@gmail.com>
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:
01e22e09 Misc maven build updates
746f5324 #556: Allow sending messages from specific UUIDs
92b99cde #501: Add PersistentDataHolder to Chunk
CraftBukkit Changes:
4ef13f94 Misc maven build updates
04639f5a #759: Allow sending messages from specific UUIDs
77c894a2 #672: Add PersistentDataHolder to Chunk
Spigot Changes:
57bbdd8e 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:
e461dcfe #555: Item - add getters/setters for owner/thrower
CraftBukkit Changes:
055870c4 #758: Item - add getters/setters for owner/thrower
Fixes twisted vines not connecting properly when grown via
bonemeal by a player.
In general, look at making this logic more robust (i.e properly handling
cases where a captured entry is overriden) - but for now this will do.
Crystals can end up in a bad state in certain conditions which causes
an exception on the expected number of crystals going negative.
This ensures the crystals/pillars are in expected state when the dragon spawns.
Restores vanilla like behavior where neighbor chunks have less priority than the source chunk.
This resolves the issue where teleporting sometimes has the chunk your arriving in slow to send.
Also improves light tasks to always process tasks when tasks from the current priority level are collected
instead of bundling them.
The maps did convert successfully, but had noisy logs due to Spigot
implementing this logic incorrectly.
This stops the spam by converting the old format to new before
requesting the world.
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:
1f4693a8 SPIGOT-6168: Fix error with Player.getBedSpawnLocation when world is unloaded while server running
On servers with plugins that constantly churn through scoreboards, there is a risk of degraded GC performance due to the number of scoreboards held on by weak references. Most plugins don't even need the (vanilla) functionality that requires all plugin scoreboards to be tracked by the server. Instead, only track scoreboards when an objective is added with a non-dummy criteria.
This is a breaking change, however the change is a much more sensible default. In case this breaks your workflow you can always force all scoreboards to be tracked with settings.track-plugin-scoreboards in paper.yml.
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:
5c77bd28 SPIGOT-6147: InventoryCloseEvent does not fire after closing player inventory
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:
5da21f87 SPIGOT-6152: End exit gates in custom ends do not send back to overworld
1ee373fe SPIGOT-6157: Crash when PortalCreateEvent cancelled
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:
a339310c#755: Fix NPE when calling getInventory() for virtual EnderChests
2577f9bf Increase outdated build delay
1dabfdc8#754: Fix pre-1.16 serialized SkullMeta being broken on 1.16+, losing textures
This reverts commit 9efe071062.
Issues have been found post merge that sadly no one discovered during test builds.
Reverting for now until we can identify the issue and do another test round.
Trying to solve random hangs we've seen, ensuring that this part of code isnt the culprit
also fixing a vanilla bug reportedby PhiPro where tickets are released too early
hoping this reduces amount of incorrect light issues.
This greatly improves performance as it drastically reduces the amount
of Entities and Tile Entities that are "registered" into the world, as
purely "cached" chunks will no longer have their entities hanging out in the world.
Additionally this fixes our Entity Add To World and Entity Remove From World events
Those events have not been firing correctly since MC changed how chunks work here.
Now the server will only consider a chunk "loaded" if it's got a ticket putting
it at level 33 or lower, which matches the public Bukkit API.
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:
ccb9614e #548: LivingEntity - add methods for getting/setting invisibility
CraftBukkit Changes:
f8d4da08#743: LivingEntity - add methods for getting/setting invisibility
Spigot Changes:
17d78dbd 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:
d75d8a38 #549: Add Fluid types / tags
CraftBukkit Changes:
890130b46#746: Add Fluid types / tags
Mojang precaches every single potential rewrite rule that could ever
exist on server startup. This includes rules from all the way back to versions from 6+ years ago.
This is the source of why the server hogs every CPU core at 100% every start.
For anyone who hard resets for updates or has force upgraded their entire world, this
results in completely wasted cpu cycles.
This massive CPU usage also delays server startup time.
We improve this by making "min version to precache" that defaults to a future version
so that no rewrite rules are precached.
someone who expects to be converting a lot chunks could theoretically set
-DPaper.minPrecachedDatafixVersion=<dataVersionConvertingFrom> as a startup
parameter and only build from that point on.
However this will likely never be needed as the server will still run
the same cache logic on demand when it's actually needed. The only
cost would be some delay on the FIRST chunk conversion, but paper already
runs chunk conversions on another thread so this will likely never be
a concern for TPS.
This patch will significantly reduce CPU use on startup, reduce memory usage,
and improve server startup time.
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:
d5a72960 SPIGOT-6063: ConsoleSender sending extra lines in Java 13+
Spigot Changes:
2740d5ae Rebuild patches
1.16.2 introduced 2 thread pools for Bootstrap vs main we didn't account for.
This also sets Bootstrap priority to be 1 less thread priority too so MC Main threads will always have
more priority specially on servers running multiple instances, since bootstrap tends to use up all CPU.
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:
91957aa3 #550: Add getHandlerList into ArrowBodyCountChangeEvent
30dc3e37 Update deprecation message for PotionMeta.setMainEffect
CraftBukkit Changes:
6f55306c4 SPIGOT-5794: Only skip interact event if position, hand and itemstack are equal
This is a pretty tiny update with very little changed. Recommended to update
from 1.16.2 ASAP as 1.16.2 is now no longer supported.
Plugins should mostly remain working as the NMS revision did not change.
Previously, Entity Activation Range only applied to the root entity of a vehicle chain.
If that vehicle is active, every entity as it's passenger would then tick.
This creates scenarios where EAR does not apply your desired ranges to passengers.
Additionally, any entity that was a passenger never had its inactiveTick method called
when the parent was inactive, creating behavioral desyncs.
This could of been a source of many villager issues when those villagers were in minecarts
as players commonly do.
Now we will process passengers checking their activation state independently of their vehicle
and if they are inactive, call their inactiveTick() method to ensure state remains consistent.
This also helps improve any desync issues with entity position of passengers too.
This also removes immunity for passenger/vehicles, so it should improve performance
of these minecart villagers too for EAR.
This makes it so entities that are passengers of other entities no longer count in the parents timings, as well as
tracks them as a separate timers per their tick status.
This lets you see how much time is spent in activated entities vs inactive (as inactive still has to do work)
Passengers is also tracked separately so you can identify "Villagers in Minecarts" vs roaming villagers, as
the lack of ability to move can impact their performance characteristics.
This will likely break any plugin that was naughty and directly messed with our internal timings as this
moves the timings to the EntityTypes object, speeding up creation of Entities to no longer store
a timing handler object per entity.
This will also change the output of the entities in timings to use internal ID's instead of class names.
If a plugin is broken by this, shame them for doing bad things. Paper will not fix it, they will have to fix it.
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:
a05df28a7 SPIGOT-6122: Revert "SPIGOT-5794: Do not skip PlayerInteractEvent"
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:
1d7440332#745: Fix getLocation for Cartography Table and Stonecutter
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:
b56e8160 #519: Add ArrowBodyCountChangeEvent
CraftBukkit Changes:
39806409e#697: Add ArrowBodyCountChangeEvent
Spigot has been stripping the minecraft-server jar down in order to
reduce it's size, primarily by removing classes they don't use from
fastutil. as we use fastutil and offer it as API, this is useless
to us, and creates headaches when it breaks builds due to spigots
version of this being installed.
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:
565a5727 #533: Add consumed item, hand and consumeItem boolean to EntityShootBowEvent
CraftBukkit Changes:
927200a9#718: Add consumed item, hand and consumeItem boolean to EntityShootBowEvent
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:
00bff0270 SPIGOT-5794: Do not skip PlayerInteractEvent
Up to now a simple counter variable was used to iterate through the
hidden-blocks in engine-mode 2 while obfuscating. This results in low
quality obfuscation.
One could for example easily write a hack, which bypasses Anti-Xray
by not showing ores, which have a certain pattern.
Furthermore, engine-mode 1 is slightly optimized by this commit.
However, engine-mode 2 is probably somewhat slower. I did some tests but
I wasn't able to get stable results for some reason. Therefore this
needs further testing.
An optimized random algorithm is utilized to pick random blocks from the
hidden-blocks list. This implementation uses xorshift and integer
multiplication for bounding. The resulting distribution is negligibly
biased because xorshift doesn't generate 0 and integer multiplication
also implies biased results.
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:
3f572834#740: Fix EntityDamageEvent not being called for non EntityDamageSource for End Crystals
3c7143e7 SPIGOT-5953, SPIGOT-5914: Use LinkedHashMap to keep captured block states in order
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:
e14c9acbe SPIGOT-6113: Ender Pearls thrown into portals that lead to disabled dimensions crash the server
97da39889 SPIGOT-6114: PlayerRespawnEvent player's location changed before event called
3b5c36769 SPIGOT-6115: Items being deleted on pick up with full inventory
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:
323d6ca3 #535: Add EntityCategory API to LivingEntity
7d3323d8 #526: Add Block#applyBoneMeal()
CraftBukkit Changes:
bf451617 SPIGOT-6109: Improve loot handling
bfea4559 SPIGOT-6111: NPE in CraftHumanEntity#openWorkbench & CraftHumanEntity#openEnchanting
ee7116b4 Add note to CONTRIBUTING.md to suggest keeping commit messages / titles the same
eae15943#721: Add EntityCategory API to LivingEntity
8c611560#702: Add Block#applyBoneMeal()
8408de02#716: Fix barrel open API playing sound twice
74b6982b#711: Add Full RGB support to the console
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:
049120068 SPIGOT-6101: Store persist state of entities
0de8365dd SPIGOT-6103: Summoning an Eye of Ender throw an Error
Spigot Changes:
b5a13e6d 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:
9aafdc9a7 SPIGOT-6099: PlayerPortalEvent.setTo ignores world for end portal travel
This patch buffers the number of logins which will attempt to join
the world per tick, this attempts to reduce the impact that join floods
has on the server
PaperMC believes that 1.16.2 is now ready for general release as we fixed the main issue plagueing the 1.16.x release, the MapLike data conversion issues.
Until now, it was not safe for a server to convert a world to 1.16.2 without data conversion issues around villages and potentially other things. If you did, those MapLike errors meant something went wrong.
This is now resolved.
Big thanks to all those that helped, notably @BillyGalbreath and @Proximyst who did large parts of the update process with me.
Please as always, backup your worlds and test before updating to 1.16.2!
If you update to 1.16.2, there is no going back to an older build than this.
---------------------------------
Co-authored-by: William Blake Galbreath <Blake.Galbreath@GMail.com>
Co-authored-by: Mariell Hoversholm <proximyst@proximyst.com>
Co-authored-by: krolik-exe <69214078+krolik-exe@users.noreply.github.com>
Co-authored-by: BillyGalbreath <BillyGalbreath@users.noreply.github.com>
Co-authored-by: stonar96 <minecraft.stonar96@gmail.com>
Co-authored-by: Shane Freeder <theboyetronic@gmail.com>
Co-authored-by: Jason <jasonpenilla2@me.com>
Co-authored-by: kashike <kashike@vq.lc>
Co-authored-by: Aurora <21148213+aurorasmiles@users.noreply.github.com>
Co-authored-by: KennyTV <kennytv@t-online.de>
Co-authored-by: commandblockguy <commandblockguy1@gmail.com>
Co-authored-by: DigitalRegent <misterwener@gmail.com>
Co-authored-by: ishland <ishlandmc@yeah.net>
If the server attempts to load a chunk generated by a newer version of
the game, immediately stop the server to prevent data corruption.
You can override this functionality at your own peril.
The existing regex is too open and allows for the absence of any actual
number data, detecting an NBT entry of just the letter "i" in upper or
lower case. This causes a single-character NBT entry to be processed as
an integer ending in "i", passing an empty String to to Integer.parseInt,
triggering an exception in loading the item.
This commit forces numbers to be present prior to the ending "i"
letter.
This patch was dropped in 1.14 . I couldn't find it in removed so I got it from 1.13
Tested with 30-40 players and works fine with default settings.
Closes https://github.com/PaperMC/Paper/issues/4070
This fixes a bug with obfuscation helpers for attack cooldown
But every other change should stay the same.
Cleaning up a lot of helpers that pointed to already unobfuscated items.
Also adds final to many of the obfhelpers to assist with inlining.
This is pretty much a patch maintenance
Hopefully fixes#4030 and hopefully fixes#4025
Use the concurrent enqueue process for all light tasks.
Restore dedicated light thread, helpful for profiling and identifying light work
as well as lets us give it a boosted thread priority
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:
eeb1042f #491: Add support to change block's lid state
CraftBukkit Changes:
8fb65851#660: Add support to change block's lid state
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:
c3a22e78 SPIGOT-6032: Add best effort target events for new entities
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:
52fd29c0d SPIGOT-6033: Bukkit.getUnsafe().getMaterial() won't match renamed block materials
No longer rely on world time as plugins like to screw it up.
Add a new flag -Dpaper.ticklist-max-tick-delay= that
will automatically drop any tick entries that have a delay
exceeding the specified amount. This is only useful
for cleaning up a world that has been corrupted by
certain blocks having a huge tick delay.
Aimed at resolving #3251
Also fix an issue with some rails connecting incorrectly
that I found when testing.
Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
Too many people try to disable async chunks thinking its the cure
to some mysterious problem.
It is not possible to fully disable async chunks, and the portion
that this config controls is so minor in the grand scheme of things.
People are needlessly hurting their server following bad advice, so
just kill this config except for the people who might actually benefit from it.
Ensures light priorities are properly processed before processing new
work, skipping the threads queue.
also stops processing work on task submission.
Also drops dead chunks light work to not waste time on work thats going to be discarded.
Fixes#3986Fixes#4002Fixes#3951
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:
09f10fd9 SPIGOT-5950: Add PrepareSmithingEvent event
CraftBukkit Changes:
7c03d257 SPIGOT-6011: End Gateways do not work on Non-Main End Worlds
d492e363 SPIGOT-6015: Small Armor Stand doesn't drop items
5db13eea SPIGOT-5950: Add PrepareSmithingEvent event
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:
f1e73b03 #525: Add contributors plugin.yml field.
ef0999fe #529: Added getRecipe() method to retrieve a Recipe by it's NamespacedKey
CraftBukkit Changes:
8b831a965#714: Added getRecipe() method to retrieve a Recipe by it's NamespacedKey
Move the criterion storage to the AdvancementDataPlayer object
itself, so the criterion object stores no references - and thus
needs no cleanup.
Fixes#3050
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:
2361cb8a8 Increase outdated build delay to 3 weeks
Spigot Changes:
d4cbb644 Update bungeecord-chat
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:
75a2fb8e0 SPIGOT-5901: Improve multiworld support
Datapacks check this on load and are built concurrently. This was breaking them badly due
to race conditions.
Plus, .canUse we want to be safe for async anyways.
Fixes#3722
Spigot stored previous componenents as new ChatComponentText("legacy codes") which
this patch aimed to convert to the new format.
However, the impl ended up converting all lines.
If a plugin had a section symbol in the lore that isn't a color conversion, it would
make trigger this process every single time.
So now we will only process it if the pattern looks like the legacy bukkit format
Fixes#3869
Stop light copy was missing a default in the impl.
Should of been extremely low chance of impacting anything though
as the very first copy operation would have fixed it.
Sadly this doesn't fix the issues weve been trying to fix.
Fix player async teleporting adding priority to wrong world for cross world teleports
Also improve teleporting to wait for entity ticking status before teleporting to prevent neighbors loading
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:
72f368909 SPIGOT-5965: BlockRedstoneEvent.setNewCurrent(0) crashes server
60f8a29d1 SPIGOT-5968: Killer rabbits can't be set to the non-killer rabbit behavior
69fddc725#705: Improve implementation of furnace related block states
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:
2f1810812 Improve physics code
Spigot Changes:
c3a49df2 Rebuild patches
Hopefully help 'technical minecrafters' find and understand these configs
by adding notes to them, and fixing the incorrect config placement on the
bedrock config.
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:
833047174 Increase outdated build delay to 7 days
5209a4f73 SPIGOT-5940: EntityChangeBlockEvent is not called for villager emptying composter
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:
b6a876bc3 SPIGOT-5936: BlockPlaceEvent does not fire for lily_pad
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:
0ca45a21 #503: Add PlayerHarvestBlockEvent
dfa80a52 SPIGOT-5930: Add PlayerRespawnEvent#isAnchorSpawn
CraftBukkit Changes:
145921e2#676: Add PlayerHarvestBlockEvent
47abffa2 SPIGOT-5929: Angered zombified piglins do not inherit killed_by_player status
7f6b4f58 SPIGOT-5930: Add PlayerRespawnEvent#isAnchorSpawn
94eff632 SPIGOT-5867, MC-193339: NPE during shutdown when rcon enabled with no password
068618eb SPIGOT-5927: Some items NBT data disappears
Spigot Changes:
beb7d47c Rebuild patches
Fixes#3738
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:
dc7c3c61f SPIGOT-5921: Improve setNoDamageTicks for Players
53849f57f SPIGOT-5922: Smithing recipes not registering
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:
1cb03826 SPIGOT-5900: Re-order Material enum entries to match Minecraft's order
fdd705db #507: Add hasDiscoveredRecipe() and getDiscoveredRecipes()
CraftBukkit Changes:
551e770f5 SPIGOT-5900: Add test for the order of Material enum entries
8297676c2#682: Add hasDiscoveredRecipe() and getDiscoveredRecipes()
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:
d9bd43b06 Change outdated build delay to 3 days
We had a bug where we accidently cloned properties resulting in skulls
growing to large sizes and preventing login.
This now automatically cleans up the extra properties.
Fixes#3719Fixes#3667
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:
6ff65c82 SPIGOT-5908: CompassMeta for new lodestone compass data
CraftBukkit Changes:
3b9cf0f8 Improve code formatting
008f039f SPIGOT-5913: MOTD no longer supports new line character
b8b65eb7 SPIGOT-5908: CompassMeta for new lodestone compass data
Spigot Changes:
4d9262cf Rebuild patches
d27f7952 SPIGOT-5912: Outdated client message shows outdated server message
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:
e16de3bb SPIGOT-5906: Huge Fungi tree generation
CraftBukkit Changes:
a13b8cfc7 SPIGOT-5907: Item Frame NBT data disappears
5a6c52983 SPIGOT-5906: Huge Fungi tree generation
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:
fdf6017fa Fix event for unlucky composts
b567cb433 SPIGOT-5910: loadAdvancement does not work
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:
42d5a714 SPIGOT-5899: Hoglins API similar to Piglins
2c1ee10e SPIGOT-5887: ClickType doesn't include off hand swaps
5ff7c7ce SPIGOT-5886: Missing BlockData
CraftBukkit Changes:
7560f5f5 SPIGOT-5905: Fix hex colours not being allowed in MOTD
d47c47ee SPIGOT-5889: Villager using composter should call EntityChangeBlockEvent
2fe6b4a3 SPIGOT-5899: Hoglins API similar to Piglins
e09dbeca SPIGOT-5887: ClickType doesn't include off hand swaps
23aac2a5 SPIGOT-5903: EntityDismountEvent cannot be triggered asynchronously
92cbf656 SPIGOT-5884: Tab completions lost on reloadData / minecraft:reload
fb4e54ad SPIGOT-5902: PlayerRespawnEvent places player at spawn before event is called
aa8f3d5a SPIGOT-5901: Structures are generated in all worlds based on the setting for the main world
a0c35937 SPIGOT-5895: PlayerChangedWorldEvent#getFrom is incorrect
89c0a5c3 SPIGOT-5886: Missing BlockData
Spigot Changes:
0287a20d SPIGOT-5903: EntityDismountEvent cannot be triggered asynchronously
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:
3c844f35 #512: Expand Strider and Steerable entity API
CraftBukkit Changes:
32acc2621#686: Expand Strider and Steerable entity API
Not sure what plugins or panels are doing to have triggered this.
Reloading resource packs appear to have been happening during shutdown
So this will abort the end of the reload process if we are not on the
correct thread and stop saving players as part of this task too.
Don't constantly send format: false for all formatting options when parent already
has it false
Going to PR this to Spigot, but putting it out here for now
Should help with reducing size of items with lots of colors from
legacy format.
Fixes per world difficulty with /difficulty command and also
makes it so that the server keeps the last difficulty used instead
of restoring the server.properties every single load.
Memory usage is a pretty useless value in any modern garbage collector
as the way memory is used makes this information not representive of
any actionable data.
In the recommended GC flags, this memory value will constantly rise until
it is near max and then goes down. This is perfectly normal and expected.
Having this information shown will lead to confusion.
Plus, many servers give this command to end users, which now really might
not want to expose this memory data.
So this disables it unless /tps mem is used, and also requires a permission
node to even run this subcommand.
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:
f009c3dd SPIGOT-5810, SPIGOT-5835: 'Better' handling of Player.isOnGround
e677c370 Update ECJ version
5058a35d SPIGOT-5860: Item.setItemStack should be NotNull
CraftBukkit Changes:
d77f4d9b SPIGOT-5810, SPIGOT-5835: 'Better' handling of Player.isOnGround
53c95627 SPIGOT-5865: Piglin does not trigger EntityPickupItemEvent
2ab04d24 Update ECJ version
7884e079 SPIGOT-5868: Blocks do not tick in custom nether / end
2a848286 SPIGOT-5863: Don't check colour in scoreboard length validation
f2cbce30 SPIGOT-5866: Beehive unknown TargetReason
Spigot Changes:
ad703da0 SPIGOT-5870: /plugins "website" field shows "version"
1a27cfd8 #98: Improve output of /plugins command using text components
732d5bab Disable checkstyle in Spigot blocks
0199a9a6 #97: Add Memory Usage to Ticks Per Second Command.
33ea98fc SPIGOT-5858: NPE: Joining the server with an invalid dimension
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:
983305bb SPIGOT-5856: Soul Campfire BlockState cannot be cast to Campfire
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:
3284612a SPIGOT-5853: Add DragonBattle#generateEndPortal()
e4db04ae SPIGOT-5841: New map colours broken
CraftBukkit Changes:
d4243510 SPIGOT-5853: DragonBattle#getEndPortalLocation() throws NPE on new world
1601ec31 SPIGOT-5845: ChatColor.RESET does not work in ItemMeta to reset italics
4d92db6f CraftChatMessageTest does not need AbstractTestingBase
71045d3d SPIGOT-5828: Unlock worlds on unload
dbc347b9 SPIGOT-5841: New map colours broken
14053c70 SPIGOT-5847: BlockFadeEvent cannot be triggered asynchronously from another thread
Spigot Changes:
6f4ff1b6 SPIGOT-5851: ChatColor (HEX) doesn't appear correctly in the ActionBar
d94a518a SPIGOT-5848: PlayerSpawnLocationEvent throws NPE when setting a location of another world
* She compiles!
Also readded the armorstand ticking patch, thanks cat
* Update mob goal api
* Misc fixes to make it run
drop per playing mob spawns for now
Remove patcehs we know need to go
add comment on one im not sure should be dropped
go ahead and fix patched repos to turn off gpg signing, as this
helps rebase/apply --continue commands not suck.
Go ahead and prep the pom file change
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:
149527f7 SPIGOT-5782: Set Arrow Launched From Crossbow
CraftBukkit Changes:
be6aaf04 SPIGOT-5782: Set Arrow Launched From Crossbow
833da9c4 SPIGOT-5799: InventoryCloseEvent fires after PlayerQuitEvent
26c0084f SPIGOT-5675, SPIGOT-5798, MC-149563: Fix tracking of entities across dimensions
7f3e7c3f SPIGOT-5797: Zombie(Villagers) Instant Convert based on their lifetime
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:
b2f1908c SPIGOT-5783: Add helpful info to UnknownDependencyException
e4f46260 SPIGOT-2623: Add EntityEquipment methods to get/set ItemStacks by slot.
529a9a69 SPIGOT-5751: Clarify behaviour of block drop-related API methods
CraftBukkit Changes:
8ea9b138 Remove outdated build delay.
ffc2b251 Revert "#675: Fix redirected CommandNodes sometimes not being properly redirected"
cb701f6b#675: Fix redirected CommandNodes sometimes not being properly redirected
c9d7c16b SPIGOT-2623: Add EntityEquipment methods to get/set ItemStacks by slot.
fad2494a#673: Fix Craftworld#isChunkLoaded
8637ec00 SPIGOT-5751: Made breakNaturally and getDrops returns the correct item if no argument is given
Spigot Changes:
a99063f7 Rebuild patches
Fixes#3602
Fixes a few various issues with chunk ticket state
restores mojangs ticket throttle but tries to be smarter about it.
fixes a few state mismatches that needed to be handled.
Fixes fake NPC's adding player tickets when they shouldn't have been.
Improves teleport chunk loading by processing high priority on new area
Fixes#3605Fixes#3537Fixes#3573
The 2 flag (send change to clients) must always be set. If it is only set
when the `map.replace` call before it does something, as was suggested
on Discord, the issue will not change whatsoever.
Fixes#3593
The setGameProfile method on TileEntitySkull is annotated with the @nullable annotation,
but the skull didn't check for null profiles before attempting to retrieve cached skin.
This bug was introduced by the commit making the skull use spigot's User Cache.
Additionally, CraftMetaSkull also had the same issue with a null GameProfile, so this also
ensures it doesn't break.
The whole CraftPlayerProfile class is not null-safe, it requires a GameProfile that isn't
null so we add a Validation on the constructor, that way it is easier to catch this kind
of issue in the future.
Fixes#3480
Previously it only controlled whether villagers could trade treasure maps.
Now it should apply to loot generated in treasure maps.
We don't unregister treasure maps from the loot table,
since this option is per-world and the table is global.
Instead I just replaced the implementation with a NOP.
Caused the server to revert to the player's overworld coordinates
after teleporting into the end.
Sidenote: The underlying issue is that the move call can teleport
entities and do other things like kill the entity. In the future,
to fix all exploits derieved from this usually unexpected
behaviour, we need to move all of this dangerous logic outside
of the move call and into an appropriate place in the tick method.
This renames the config from enable tnt duping to enable piston duping
Normally we would not have a config for rails and carpet duping, but
the fix for TNT is the same fix for rails and carpet, so they are
having to be covered under that same config.
As it stands, one can complete from the cache if no ID is given. If
there is no ID, it will throw an NPE, as ConcurrentHashMap (which is used
in UserCache) does not support null keys. This should fix any current
and future issues where exceptions are thrown just because a UUID is not
currently given on the profile due to a plugin or server bug/issue.
Fixes#3590.
Talked with leaf on it and understand what its going now even though
it was a hack fix by Spigot, but seems ok.
I had orig made this change thinking it was the source of another
issue but that came out to not be true.
Fixes#3573
Adds Netty Channel Flush Consolidation to reduce the amount of flushing
This improves performanceo of netty event loop.
If a problem is encountered with this, you can disable it by adding the java flag:
-DPaper.disableFlushConsolidate=true
Also avoids spamming closed channel exception by rechecking closed state in dispatch
and then catch exceptions and close if they fire.
This should resolve connections getting stuck spamming ChannelClosed in logs and
let them clean up and close correctly.
ensure we add missing player tickets even if already full status
remove the player ticket throttler entirely... causes a lot of issues and
our system handles the role that it was serving now too.
increase max delays on farther out chunks load delay
remove -5 priority delay for distant chunks seemed it applied at weird times.
ensure if delay distance manager tick ever got left lingering it unsets on a chunk load.
Fixes#3572
Spigots cache only cached by name which really was not correct...
Additionally, user cache exposes a cache of any player who has logged in
once this session too even if offline.
Also fixed some quirks with Profile API where we might of had textures
in the cache that we didn't even try to look up.
So this should overall help reduce API calls to Mojang.
Sadly, the User Cache doesn't cache textures, but if that ever
changes in future, we would gain benefit there too.
Rewrites the Threaded task logic to no longer use 2 queues and instead
keep a single prioritized queue and do all of a chunks light tasks in a single batch
Fix a math issue in one place (Thankfully didn't seem to really be a common place since didn't notice anything)
This patch fixes a bug in the WorldChunkManagerTheEnd class where the distance
from 0,0 squared overflows the maximum size of an integer. The overflow leads
to hard chunk borders around 370,000 blocks from 0,0. After this cutoff there
is a few hundred thousand block gap before end land resuming to generate at
530,000 blocks from spawn. This is due to the integer flipping back and forth.
The fix for the issue is quite simple, casting chunk coordinates to longs
allows the distance calculation to avoid overflow and work as intended.
We had 2 issues.
1) Log4J2 Shutdown hook seemed to be causing issues as it shutdown logger while we still needed it
2) ServerShutdownThread needs to stay alive until server is shutdown to keep jvm open.
It appears SIGINT is handled differently than SIGTERM, as SIGINT worked correctly.
But this will make both methods work.
Fix bug where mojang has a -90 modifier in yaw resulting in us calculating
chunks to the players left rather than in front of them.
Drastically improve Frustum Prioritization function to reduce lag from its
calculations (Found it was being spammed really heavy on world add/teleport)
Also improved the logic behind choosing chunks to prioritize.
Add Priority tickets to a radius of 3 on any login, world chnge or teleport
This should help improve world load / chunk sending upon a player changing
locations by loading those chunks faster.
Improved the Player Ticket Delayer to be a little bit smarter about delays to
let closer chunks load a bit faster and only delay the farther out ones more.
This update will provide significant improvements to priority of chunks and
reduce the cpu cost of doing these calculations.
Fixes#3530
There is some vanilla level bug where this tracking state appears
to get messed up and player doesn't exists in chunk its trying to untrack.
We returned early to prevent crashing, but I suspect if there was a level being
tracked for the chunk, it got leaked due to the early return.
So going to ensure we clean up the level tracker when this state occurs.
This may help with any leaked chunk issues.
Now supports async chunk access even though doing that is bad
and shouldn't be done anyways since we force you back to main, itll
now just delay the ticket add to main the same way.
Now only add the ticket if the plugin CAUSED the chunk load, so no longer
adds ticket if the chunk was already loaded.
Additionally, cap chunk ticket limits to 1 second (Effectively ignoring chunk-gc config
unless the config is lower than 20 ticks)
Fixes#3533
Obfuscate multiple chunks at a time over the server thread pool.
Will speed up chunk processing when anti xray is enabled.
Co-authored-by: Aikar <aikar@aikar.co>
Like previous versions, plugins loading chunks kept them loaded until
they garbage collected to avoid constant spamming of chunk loads
This adds tickets to a few more places so that they can be unloaded.
Additionally, this drops their ticket level to BORDER so they wont be ticking
so they will just sit inactive instead.
Using .loadChunk to keep a chunk ticking was a horrible idea for upstream
when we have TWO methods that are able to do that already in the API.
Not adding it to .getType() though to keep behavior consistent with vanilla.
In previous MC versions, we had a rather simple internal scheduler
for delayed tasks that would just keep pushing task back until desired
tick was reached.
The method it called to schedule the task changed behavior in 1.14, and now
this scheduler is not working nowhere near what it was supposed to be doing.
This was causing long delayed task to eat up CPU (In Oversleep for example)
Rewrite this to just use the CraftScheduler for scheduling delayed tasks.
Once this was fixed, it became quite clear the code that delayed ticket
additions for chunks based on distance was clearly not right, as it was
tested on the previous broken logic.
So the ticket delay process has been vastly revamped to be even smarter.
Chunks behind the player can load slower than the chunks in front of the player.
We also can delay ticket adding until one of its neighbors has loaded, as
this lets us get a smoother spiral out for the chunks (minus frustum intent).
Additionally on frustum previous commit inadvertently broke frustum trying to
fix an issue when the real fix lied elsewhere, so restore chunk priority so
it works again.
When players are moving in the world, doing things such as building or exploring,
they will commonly go back and forth in a small area. This causes a ton of chunk load
and unload activity on the edge chunks of their view distance.
A simple back and forth movement in 6 blocks could spam a chunk to thrash a
loading and unload cycle over and over again.
This is very wasteful. This system introduces a delay of inactivity on a chunk
before it actually unloads, which will be handled by the ticket expiry process.
This allows servers with smaller worlds who do less long distance exploring to stop
wasting cpu cycles on saving/unloading/reloading chunks repeatedly.
Upon further knowledge of the system, it is known that region files
are closing properly, as well as this didn't help native memory use anyways.
This patch also caused issues compiling on a newer JDK being able to
release the jar to java 8 users.
priority tickets being added at 33 was hurting sync EMPTY and lesser requests.
this was likely the source of recent treasure map issues.
This then further hurt nether portal travel too. lots of oddness around.
This also avoids scheduling a level change on ticket removal when the level
is unchanged, as well as ditches CB's horrible change to not letting
you access an unloading chunk which should be valid to cancel the unload
I'm going make a class, and in that class i'm going to
make a method. And in that method, I'm going to make a local class.
And then in that local class, I'm going to make another inner class.
I heard you like complex class trees.
Massive update to light to improve performance and chunk loading/generation.
1) Massive bit packing/unpacking optimizations and inlining.
A lot of performance has to do with constant packing and unpacking of bits.
We now inline a most bit operations, and re-use base x/y/z bits in many places.
This helps with cpu level processing to just do all the math at once instead
of having to jump in and out of function calls.
This much logic also is likely over the JVM Inline limit for JIT too.
2) Applied a few of JellySquid's Phosphor mod optimizations such as
- ensuring we don't notify neighbor chunks when neighbor chunk doesn't need to be notified
- reduce hasLight checks in initializing light, and prob some more, they are tagged JellySquid where phosphor influence was used.
3) Optimize hot path accesses to getting updating chunk to have less branching
4) Optimize getBlock accesses to have less branching, and less unpacking
5) Have a separate urgent bucket for chunk light tasks. These tasks will always cut in line over non blocking light tasks.
6) Retain chunk priority while light tasks are enqueued. So if a task comes in at high priority but the queue is full
of tasks already at a lower priority, before the task was simply added to the end. Now it can cut in line to the front.
this applies for both urgent and non urgent tasks.
7) Buffer non urgent tasks even if queueUpdate is called multiple times to improve efficiency.
8) Fix NPE risk that crashes server in getting nibble data
Fixes#3489Fixes#3363
Previously maps would load all chunks in a certain radius depending on
their scale when trying to update their content. This would result in
main thread chunk loads when they weren't really necessary, especially
on low view distances or "slow" async chunk loads after teleports or
other prioritisation.
This changes it to only try to render already loaded chunks based on
the assumption that the chunks around the player will get loaded
eventually anyways.
In rare cases, this class could potentially be loaded from
the chunk threads causing it to initialize async and cause errors.
This would then break the server and chunk saving.
So ensure its loaded at start of server to avoid this.
Still needs front end changes to see it yet though.
1) Adds Game Rules per world
2) Adds View distances per world
3) Removes extra garbage on lambda task names
4) Adds more memory information such as native load
5) Adds load average for non crap operating systems.
6) Fixes online mode showing false when privacy=true
7) Adds Data packs loaded
Switch to a standard fixed size ThreadPoolExecutor as we don't use the
advanced capabilities of a ForkJoinPool.
ForkJoinPool does not allow single threads, and really rather not use
2 different executor types based on core count.
Also, change thread priorities so that main thread is prioritized by
the OS at a higher priority than the other threads. May not help too much
but it at least signals the OS the information to know main is more important.
Locks dimension manager to the first world its used with.
WE is creating a temp world and the world ref on that manager
is getting changed to the temp world.
This would of also caused a memory leak of that temp world too.
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
My recent work on serialization is now in CraftBukkit so was able to drop the patch and Paper
is now consistent with upstream.
Bukkit Changes:
e2699636 Move API notes to more obvious location
CraftBukkit Changes:
1b2830a3 SPIGOT-4441: Fix serializing Components to and from Legacy
This should now complete legacy serialization to avoid ever
changing the output content.
This removes the concept of "Default Color" from the method as
that entire concept was flawed and broke the intent of chat components.
Going to actually PR this patch to Spigot soon.
This now puts us back at a point where any data saved pre Spigot
breaking things will still save back the exact same way as before,
but new component -> legacy will now be fixed to not insert undesirable
default colors (such as black) into the legacy string, and instead use
the proper reset code.
This means you can now safety get the text from a book and
put it in chat or an entity display name without worry about black
color codes or other undesired color codes leaking into the new
context where that color doesn't make sense.
This brings chat componenent serialization to 100% accuracy so
that any text input in the legacy format, converting to comps and
then back to legacy will result in identical results.
If the user explicitly sets a color as prefix to a string, it is retained,
even if that color matches the default.
This also helps improve dealing with the empty string wrappers Bukkit creates.
A unit test has been added to verify this behavior.
This patch fixes the serialization of display names, item lores and
other things which use strings with color codes. The old implementation
deleted the color codes at the beginning of the resulting string if it
matched the default color passed to the conversion function. This
resulted in items having a black display name losing the black color
code in the beginning of the text when the item was serialized (e.g.
saving an ItemStack in a Yaml config).
Spigot has now made the issue worse and expanded the scope to more places.
1) Improve frustum to look more at the near chunks and frontal chunks only instead of 1 large single look up.
2) Delay adding 33 tickets based on view distance and lower their task priority. This will slower roll out the spiral
3) Chunks behind the player have additional delay on loading, favoring chunks in front of the player.
This has benefit that if faster traveling, some of the chunks will be cancelled / not loaded.
This should reduce pressure on chunk loading, as well as reduce loading/unloading unnecessary chunks while moving.
When a chunk is loaded from disk that has already been generated,
the server has to promote the chunk through the system to reach
it's current desired status level.
This results in every single status transition going from the main thread
to the world gen threads, only to discover it has no work it actually
needs to do.... and then it returns back to main.
This back and forth costs a lot of time and can really delay chunk loads
when the server is under high TPS due to their being a lot of time in
between chunk load times, as well as hogs up the chunk threads from doing
actual generation and light work.
Additionally, the whole task system uses a lot of CPU on the server threads anyways.
So by optimizing status transitions for status's that are already complete,
we can run them to the desired level while on main thread (where it has
to happen anyways) instead of ever jumping to world gen thread.
This will improve chunk loading effeciency to be reduced down to the following
scenario / path:
1) MAIN: Chunk Requested, Load Request sent to ChunkTaskManager / IO Queue
2) IO: Once position in queue comes, submit read IO data and schedule to chunk task thread
3) CHUNK: Once IO is loaded and position in queue comes, deserialize the chunk data, process conversions, submit to main queue
4) MAIN: next Chunk Task process (Mid Tick or End Of Tick), load chunk data into world (POI, main thread tasks)
5) MAIN: process status transitions all the way to LIGHT, light schedules Threaded task
6) SERVER: Light tasks register light enablement for chunk and any lighting needing to be done
7) MAIN: Task returns to main, finish processing to FULL/TICKING status
Previously would have hopped to SERVER around 12+ times there extra.
Mojang has flaws in their logic about chunks being concurrently
wrote to. So we constantly see crashes around multiple threads writing.
Additionally, java has optimized synchronization so well that its
in many times faster than trying to manage read wrote locks for low
contention situations.
And this is extremely a low contention situation.
Fixes#3293Fixes#2493
I'm hoping the other fix in 324 for the level map getting corrupted
fixes the real issue and this isn't needed anymore, but i suspect it is
will wait until more study can be done though.
Fixes#3469
We must check the level tracker as ticket levels add "virtual"
tickets to neighbors.
Also added neighbor tracking during generation to be extra safe.
Fixes#3465Fixes#3451Fixes#3459
Mojang implemented a cache like chunks have, but this cache
is accessed by multiple threads and is totally not safe.
So just remove it
Fixes#3466
Also missed a pooled nibble release, so slid that in there too.
This change reimplements the entire BehaviorFindPosition method to
get rid of all of the streams, and implement the logic in a more sane way.
We keep vanilla behavior 100% the same with this change, just wrote more
optimal, as we can abort iterating POI's as soon as we find a match....
One slight change is that Minecraft adds a random delay before a POI is
attempted again. I've increased the amount of that delay based on the distance
to said POI, so farther POI's will not be attempted as often.
Additionally, we spiral out, so we favor local POI's before we ever favor farther POI's.
We also try to pathfind 1 POI at a time instead of collecting multiple POI's then tossing them
all to the pathfinder, so that once we get a match we can return before even looking at other
POI's.
This benefits us in that ideally, a villager will constantly find the near POI's and
not even try to pathfind to the farther POI. Trying to pathfind to distant POI's is
what causes significant lag.
Other improvements here is to stop spamming the POI manager with empty nullables.
Vanilla used them to represent if they needed to load POI data off disk or not.
Well, we load POI data async on chunk load, so we have it, and we surely do not ever
want to load POI data sync either for unloaded chunks!
So this massively reduces object count in the POI hashmaps, resulting in less hash collions,
and also less memory use.
Additionally, unemployed villagers were using significant time due to major ineffeciency in
the code rebuilding data that is static every single invocation for every POI type...
So we cache that and only rebuild it if professions change, which should be never unless
a plugin manipulates and adds custom professions, which it will handle by rebuilding.
Some plugins are doing really really bad things to worlds breaking the
ability to send sounds to some users.
So creating another reference to the player chunk map that plugins wont be breaking, and
print a stack trace at world creation if we ever get an expected world state to identify
who is doing it!
If we encounter this illegal state, we fall back to the old method of sending sounds, so
sending sounds will still work, just less effecient.
Spigot made structure start not load chunks, but forgot to null check
the result...
This likely never blew up before due to the chunk leak issue, but now
that leaky chunks are cleaned up, it was identified.
While last was mostly there, still had some slight risk of unloading
before it was fully finished.
So just going to bump the delay to 3 minutes to be safe. Better than
forever at least.
Was really hoping we could unload them as soon as they were done to
any memory prematurely promoting to old generation, but guess we can't.
A chunk was loaded but not yet finished in use and was unloaded too early.
This caused it to be reloaded again or caused crashes.
Now also check if the chunk pops out of the unload queue that it also
doesn't now have a ticket either.
Due to some complexity in mojangs complicated chain of juggling
whether or not a chunk should be unloaded when the last ticket is
removed, many chunks are remaining around in the cache.
These chunks are never being targetted for unload because they are
vastly out of view distance range and have no reason to be looked at.
This is a huge issue for performance because we have to iterate these
chunks EVERY TICK... This is what's been leading to high SELF time in
Ticking Chunks timings/profiler results.
We will now detect these chunks in that iteration, and automatically
add it to the unload queue when the chunk is found without any tickets.