3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 04:20:04 +01:00
Commit graph

3241 Commits

Autor SHA1 Nachricht Datum
Connor (Vectrix)
2ee16de8ae Ensure the passenger player gets retracked by the vehicle player on disconnection (#1781) 2019-01-01 00:32:33 -06:00
Shane Freeder
ac697484cf
Cleanup after plugins which don't sucessfully enable
This change closes the plugin via the plugin manager, which disables
the plugin, as intended, but also cleans up after the plugin, preventing
any further errors or issues caused by tasks scheduled by the plugin before
it failed.

Backport of 1.13 cf772531f4
2018-12-06 22:09:08 -05:00
Zach Brown
cbd70031ec
Update upstream CB/S
--- work/CraftBukkit
Submodule work/CraftBukkit d7bebeff0..acbc348e9:
  > SPIGOT-4477: Arrows only firing direction of boat
  > Improve zombie villagers

--- work/Spigot
Submodule work/Spigot dcd16439b..e8ded36bc:
  > Rebuild patches
  > Add PlayerConnection timings
2018-12-06 22:02:57 -05:00
Amosar
ea0646b6f6
backport: SPIGOT-2719: Comparator and Observer don't trigger BlockRedstoneEvent 2018-12-01 20:04:38 +00:00
Aikar
cedf38aac0
Handle Large Packets disconnecting client
If a players inventory is too big to send in a single packet,
split the inventory set into multiple packets instead.
2018-11-27 21:56:54 -05:00
Zach Brown
b82359ef5a
Persist ArmorStand canTick API value across restarts 2018-11-27 18:40:56 -05:00
Aikar
cfe5920cab
Prevent rayTrace from loading chunks
ray tracing into an unloaded chunk should be treated as a miss
this saves a ton of lag for when AI tries to raytrace near unloaded chunks.
2018-11-26 19:44:34 -05:00
Aikar
a62a77885d
Specify charset explicitly on getBytes 2018-11-17 00:39:22 -05:00
Aikar
07c797387b
Limit Book Sizes 2018-11-17 00:32:40 -05:00
BlackHole
531dfad2d2
Fix PreFillProfileEvent 2018-11-08 19:00:27 -05:00
Zach Brown
67787d388c
Fix server icon encoding to show on newer clients
The base64 encoding method for server favicons in 1.12 puts newlines in
the encoded string. The 1.13 client and server pair fixed this issue and
no longer consider it valid. Luckily the 1.12.2 client will parse the
correct encoding just fine as well.

This fixes the encoding so that the server icon will display properly on
both 1.12.2 clients as well as newer clients.

Shout out to ViaVersion whose contributors noticed this some time ago.
2018-11-05 21:53:33 -05:00
Aikar
857123a653
Keep players yaw/pitch on vehicle updates 2018-11-02 23:24:35 -04:00
Zach Brown
4297106c09
Do not let the server load chunks from newer versions
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.
2018-10-23 22:06:33 -04:00
Zach Brown
b15c43a389
Update upstream for minecart spawner improvement 2018-10-23 19:03:32 -04:00
Aikar
e7245e68bd
Backport Timings improvements from 1.13 2018-10-17 23:11:04 -04:00
Aikar
fce9e20719
MC-54026: Backport 1.13 client desync fix on fast tools 2018-10-17 22:53:08 -04:00
Aikar
ca8dc1b847
Actually fix mob spawning for real
Fixes #1567
2018-10-12 16:54:46 -04:00
Aikar
be4fc8c7af
Backport the dupe uuid and entity log changes 2018-10-12 01:38:32 -04:00
Aikar
8601385dd7
Further improve village door code for 1.12 2018-10-11 21:50:37 -04:00
Aikar
b91846a31b
Backport Detect and recover from corrupt region files
see 0693716984
2018-10-11 21:16:12 -04:00
Aikar
33d2de5f72
Improve Village Door fix to not merge villages (Iron Titan)
Improves doors to better handle unloaded state so they need 1200 LOADED ticks
in order to not be dismissed.

Also improves the villages to not even tick when the center of the village + 1
is not loaded, improving server performance (and helping door issue)

This should keep Iron Titans back working
2018-10-11 21:16:08 -04:00
Shane Freeder
583be93c81
Fix inversion issue in last patch 2018-10-11 20:03:52 +01:00
Shane Freeder
87d2e76860
Fix oversight in behavior of last patch 2018-10-08 20:29:37 +01:00
Shane Freeder
c353860748
Backport: Prevent mob spawning from loading/generating chunks 2018-10-08 18:18:00 +01:00
Aikar
f949449338
Backport Water Activation Range
Adds Entity Activation Range for water mobs
and no longer gives immunity to mobs (squid) that know how to
pathfind in water.
2018-10-06 01:13:48 -04:00
Aikar
67370956a0
Backport light fix for recheck gaps 2018-10-06 01:04:31 -04:00
Aikar
3ac4505b1e
Fix bug in the last commit for loot table fix 2018-10-01 20:28:06 -04:00
Zach Brown
7ec576d1fc
Fix cancelled lootables 2018-09-29 22:42:20 -04:00
Aikar
a690c979f1
Backport Village Door fix from 1.13 2018-09-29 12:14:40 -04:00
Aikar
22fd638482
Fix issues with entity loss due to unloaded chunks
Vanilla has risk of losing entities by causing them to be
removed from all chunks if they try to move into an unloaded chunk.

This pretty much means high chance this entity will be lost in this scenario.

There is another case that adding an enttiy to the world can fail if
the chunk isn't loaded.

Lots of the server is designed around addEntity never expecting to fail for these reasons,
nor is it really logical.

This change ensures the chunks are always loaded when entities are
added to the world, or a valid entity moves between chunks.

Hopefully will fix issues #1496 and #1434
2018-09-27 23:52:46 -04:00
Aikar
de977253d9
Re-add toggle for light queue, bump queue time
there is apparently bugs with relighting, so turning toggle back on

also bumped the max time threshold to reduce risk of starving the queue

allows it to violate TPS some, but at cost of better light data

also fixed some chunk neighbor checks
2018-09-25 23:37:01 -04:00
Zach Brown
c1cd6183f5
Update 1.12.2 distribution info just in case 2018-09-24 21:03:09 -04:00
Zach Brown
69c8e71723
Allow zero revive health when it matches maxHealth
Apparently a zero max health attribute is perfectly fine in vanilla and
our own revive handling code appears to handle the case fine, even when
EntityDeathEvent is cancelled. So we should allow it to avoid issues
when these mobs are killed.
2018-09-24 20:54:43 -04:00
Aikar
9759652bfb
Backport light queue changes from 1.13 2018-09-23 20:45:32 -04:00
BillyGalbreath
e0a25a9b99
Fix NPE race condition in ServerListPingEvent
Fixes GH-1473

If a ping is responded to prior to the server sample being populated
(pre-tick as an example) it can result in an NPE.
2018-09-23 00:05:54 -04:00
Aikar
4909d1366c
Sync Player Position to Vehicles
Player Positions could become desynced with their vehicle resulting
in chunk conflicts about which chunk the entity should really be in.
2018-09-21 11:40:46 -04:00
Aikar
15712119ad
Optimize Region File Cache
CraftBukkit added synchronization to read and write methods. This adds
much more contention on this object for accessing region files, as
the entire read and write of NBT data is now a blocking operation.

This causes issues when something then simply needs to check if a chunk exists
on the main thread, causing a block...

However, this synchronization was unnecessary, because there is already
enough synchronization done to keep things safe

1) Obtaining a Region File: Those methods are still static synchronized.
   Meaning we can safely obtain a Region File concurrently.

2) RegionFile data access: Methods reading and manipulating data from
   a region file are also marked synchronized, ensuring that no 2 processes
   are reading or writing data at the same time.

3) Checking a region file for chunkExists: getOffset is also synchronized
   ensuring that even if a chunk is currently being written, it will be safe.

By removing these synchronizations, we reduce the locking to only
when data is being write or read.

GZIP compression and NBT Buffer creation will no longer be part of the
synchronized context, reducing lock times.

Ultimately: This brings us back to Vanilla, which has had no indication of region file loss.
2018-09-16 14:26:30 -04:00
Aikar
ec58c208b3
Performance & Concurrency Improvements to Permissions
Modifying of permissions was only half protected, enabling concurrency
issues to occur if permissions were modified async.

While no plugin really should be doing that, modifying operations
are not heavily called, so they are safe to add synchronization to.

Now, all modification API's will be synchronized ensuring safety.

Additionally, hasPermission was victim to a common java newbie mistake
of calling if (containsKey(k)) return get(k), resulting in 2 map lookups.

Optimized it to simply be a single get call cutting permission map
lookups in half.
2018-09-13 20:59:32 -04:00
Zach Brown
cce3635569
Update branch for github version checking 2018-09-13 12:06:16 -04:00
Zach Brown
b380338244
Ensure entity is always dying before Death Event
Prior to this it was possible for plugins to put the server into a never
ending recursive loop until it eventually killed itself.

Fixes GH-1432
2018-09-11 17:38:57 -04:00
Aikar
6793fee387
Remove no longer needed tests due to last change 2018-09-09 01:14:18 -04:00
Aikar
5228a4f24c
Remove deadlock risk in firing async events
The PluginManager incorrectly used synchronization on firing any event
that was marked as synchronous.

This synchronized did not even protect any concurrency risk as
handlers were already thread safe in terms of mutations during event
dispatch.

The way it was used, has commonly led to deadlocks on the server,
which results in a hard crash.

This change removes the synchronize and adds some protection around enable/disable
2018-09-09 01:04:59 -04:00
Max Lee
4e30b91d4e Improve death events (#1362)
* Improve death events

This adds the ability to cancel the events and to specify the sound.
2018-09-07 20:14:48 -04:00
Gergely Sarkozi
2d45ec855f Cached, local-class-supporting task names (#1409)
Fixes issue #1177 

`MapMaker#weakKeys()` makes the `Map` use identity comparison for the keys, while also enabling the automatical removal of dropped classes from the cache.

The changes are the same as in #1399, except now the original patch is modified instead of a new one being created.
2018-09-03 10:04:50 -04:00
Aikar
2ae60bd203
Pull the last upstream updates 2018-08-31 11:51:41 -04:00
Shane Freeder
cd5da239f8
Fixup AsyncTabCompletionEvent handling 2018-08-28 22:12:21 +01:00
cakoyo
a1e9cd39d2 Add source block to BlockPhysicsEvent (#1364)
Resolves #1275 

For plants, the source block is itself, because the `changed` type is itself.
2018-08-24 10:38:31 -04:00
Aikar
0ade5595ad
[CI-SKIP] Ensure symlink process never fails build
not sure if this is source of #1365, but doesn't hurt to make
this a non fatal error if the symlink command fails.
2018-08-23 21:51:13 -04:00
Christopher White
6c32ee4a5c Add isChunkGenerated API (#1363)
Resolves #1329
2018-08-22 21:13:03 -04:00
Aikar
1218b4aae6
Fix some false positive warnings printing that shouldnt be
reduces some log spam
2018-08-20 20:20:40 -04:00