Commit Graph

2886 Commits

Author SHA1 Message Date
Mariell
63d6aac46a
Updated Upstream (CraftBukkit) (#4663) 2020-10-17 21:42:18 +01:00
Shane Freeder
8319e912f4 Fix SafeNBTCopy#hasKey semantics
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
2020-10-17 12:46:37 +01:00
Shane Freeder
85eccb571b Don't assume that entries exist for SafeNBTCopy 2020-10-17 12:20:44 +01:00
Mariell
595734a57e
Updated Upstream (Bukkit/CraftBukkit/Spigot) (#4659)
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>
2020-10-17 11:39:45 +01:00
Shane Freeder
fa990d26af Revert "Updated Upstream (Bukkit/CraftBukkit/Spigot)"
This reverts commit 23826a3f66.
2020-10-17 10:48:00 +01:00
Shane Freeder
23826a3f66 Updated Upstream (Bukkit/CraftBukkit/Spigot)
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
2020-10-17 09:24:25 +01:00
stonar96
efd90b1e9c
Anti Xray: Obfuscate blocks touching lava feature (#3311) 2020-10-16 17:08:33 -04:00
Mariell Hoversholm
74f507f4e3 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:
e461dcfe #555: Item - add getters/setters for owner/thrower

CraftBukkit Changes:
055870c4 #758: Item - add getters/setters for owner/thrower
2020-10-14 10:44:15 -04:00
Aurora
ffe68e8875
Update discord link in the paper.yml (#4646) 2020-10-13 18:37:34 -07:00
Spottedleaf
68a1f9ffa7
Reduce blockpos allocation from pathfinding 2020-10-11 19:51:10 -04:00
Spottedleaf
98f1aae7fa
Retain block place order when capturing blockstates
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.
2020-10-11 19:51:02 -04:00
Spottedleaf
431bb179c9
Improve inlinig for some hot IBlockData methods 2020-10-11 19:18:27 -04:00
Spottedleaf
559ff369be
Optimise getType calls
Remove the map lookup for converting from Block->Bukkit Material
2020-10-11 18:52:57 -04:00
Spottedleaf
cbecca2636
Fix for large move vectors crashing server
Check movement distance also based on current position.
2020-10-11 18:48:05 -04:00
ForceUpdate1
217702d573
Fix distance in checkHighPriorityChunks (Fixes #4582) (#4605) 2020-10-11 18:24:06 -04:00
Aikar
6eda4251f3
Reset Ender Crystals on Dragon Spawn - Fixes #3522
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.
2020-10-11 16:11:57 -04:00
chickeneer
01b1971a43
MC-147729: Drop items that are extra from a crafting recipe 2020-10-11 13:47:45 -04:00
Aikar
b2381db24e
Improve Priority handling of neighbor chunks
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.
2020-10-10 22:12:43 -04:00
jmp
1c446c222d Fix CME when adding a passenger during Spawn events (#4616) 2020-10-10 17:05:17 +02:00
Aikar
f3927b25eb
Fix "Not a string" Map Conversion spam - Fixes #3901
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.
2020-10-08 00:02:03 -04:00
Aikar
3ece90368d
[CI-SKIP] [Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2020-10-07 16:27:02 -04:00
William Blake Galbreath
551fac7ec5 Fix deop kicking non-whitelisted player when white list is not enabled 2020-10-07 22:22:06 +02:00
Mariell
faf8eb035a
Updated Upstream (CraftBukkit) (#4622)
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
2020-10-06 09:59:35 -04:00
Mariell
d62bab6e25
Add a missing return in Eigencraft redstone (#4621) 2020-10-05 17:03:41 +01:00
BillyGalbreath
5234e6e242
Entity#isTicking (#4612) 2020-10-03 23:05:33 -04:00
Andrew Steinborn
1165d59526 Lazily track plugin scoreboards by default
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.
2020-10-03 21:13:12 +02:00
Mariell Hoversholm
8a046c95a4 Updated Upstream (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

CraftBukkit Changes:
5c77bd28 SPIGOT-6147: InventoryCloseEvent does not fire after closing player inventory
2020-10-01 10:33:58 -04:00
Mariell Hoversholm
a7861cbb48 Updated Upstream (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

CraftBukkit Changes:
5da21f87 SPIGOT-6152: End exit gates in custom ends do not send back to overworld
1ee373fe SPIGOT-6157: Crash when PortalCreateEvent cancelled
2020-09-30 16:17:26 -04:00
MeFisto94
6c512a082d Expose the Entity Counter to allow plugins to use valid and non-conflicting Entity Ids 2020-09-29 19:16:25 +02:00
Mariell Hoversholm
654b792caf Updated Upstream (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

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
2020-09-27 11:04:51 -04:00
Mariell Hoversholm
5a988f2e45 Patch SPIGOT-6086 for all invalid locations
md_5's patch for SPIGOT-6086 only applies to locations over the world,
not those under or outside it.
2020-09-27 10:39:37 -04:00
Aikar
079a793b51
Revert "Only consider chunks Loaded if at BORDER status"
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.
2020-09-21 22:12:28 -04:00
Mariell Hoversholm
eda80e3d7c Prevent fire from spreading to invalid locations 2020-09-21 21:09:04 +02:00
Aikar
826e09f369
Light improvements
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.
2020-09-19 14:04:25 -04:00
Aikar
e3e1191ac9
Preserve initial velocity of spawned entities - Fixes #4292 2020-09-19 13:19:34 -04:00
Aikar
bd648dfb47 Optimize some methods for inlining
Adds final to some methods to improve inlining ability
2020-09-19 12:54:05 -04:00
Aikar
9efe071062 Only consider chunks Loaded if at BORDER status
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.
2020-09-19 12:54:05 -04:00
Shane Freeder
298c9022b0 Updated Upstream (Bukkit/CraftBukkit/Spigot)
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
2020-09-19 12:29:53 +01:00
Shane Freeder
d802a50a9a Extend block drop capture to capture all items added to the world (Fixes #4307)
Closes #4316
2020-09-17 00:40:07 +01:00
Aikar
613bdc3f96
[Auto] 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:
d75d8a38 #549: Add Fluid types / tags

CraftBukkit Changes:
890130b46 #746: Add Fluid types / tags
2020-09-14 05:57:06 -04:00
Aikar
e6faa36eb9
Cache DataFixerUpper Rewrite Rules on demand
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.
2020-09-12 17:56:00 -04:00
Mariell
a0b8b886c8
Updated Upstream (CraftBukkit/Spigot) (#4318)
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
2020-09-12 15:57:21 -04:00
Aikar
fb71c71c80
Restore thread pool names for Bootstrap vs main
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.
2020-09-12 11:25:30 -04:00
Aikar
5b352d9b33
[Auto] 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:
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
2020-09-11 18:42:19 -04:00
Aikar
7d85344efd
(1.16.3) Missed some fixes to include in commit 2020-09-10 19:56:58 -04:00
Aikar
64ed429884
(FIRST 1.16.3): Update Paper to 1.16.3
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.
2020-09-10 19:47:58 -04:00
Aikar
fa9c5e0f95
(FINAL 1.16.2) Improve Entity Activation Range passenger behavior
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.
2020-09-10 19:08:02 -04:00
Aikar
6fda3fd0ed
(FINAL 1.16.2) Improve Timings support for Active vs Inactive vs Passengers
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.
2020-09-10 19:08:02 -04:00
JRoy
794e6baf14 Add additional open container api to HumanEntity 2020-09-10 20:31:49 +02:00
Shane Freeder
44e822f7cf Fix block data exception when cancelling PortalCreateEvent (#4199) 2020-09-10 09:02:22 +01:00