Commit Graph

22 Commits

Author SHA1 Message Date
Spottedleaf
bd96e299d4 Update paper 2023-07-06 22:26:45 -07:00
Sofiane H. Djerbi
6b978f2aaf Add Yaw and Pitch to CraftEntity.teleportAsync 2023-07-01 13:51:05 -07:00
Spottedleaf
6e317fd38a Only thread-check addEffect for entities in the world
Resolves possible crashes when adding effects before adding to the
world or when adding from the worldgen threads.
2023-07-01 13:43:32 -07:00
Spottedleaf
bff0370b70 Check region for Vex spell origin
If the Vex portals or is moved far enough away, it may trip
a thread check.

Fixes https://github.com/PaperMC/Folia/issues/95
2023-07-01 13:12:44 -07:00
Spottedleaf
eb2231736b Only update time for local players in time update tick
This was done in 1.19.4, but the diff to use getLocalPlayers()
was dropped by accident.

Fixes https://github.com/PaperMC/Folia/issues/114
2023-07-01 12:18:44 -07:00
Spottedleaf
d1c9e63470 Use teleportAsync for handling cancelled move events
Some plugins are bad and update the `from` position to something
completely garbage. To avoid a crash from this cross-region
teleportation, the teleportAsync function is now used.

The reason the teleport isn't simply ignored is since there may
be legitimate reasons to update the `from` position to something
off-region. This also handles the case where the plugin _uses_
an asynchronous teleport while cancelling the event.

This mirrors the behavior for changing the target destination
but not cancelling the event.

Fixes https://github.com/PaperMC/Folia/issues/115
2023-07-01 12:10:16 -07:00
Spottedleaf
801cff1570 Re-add dropped thread check for retrieving fall position from entities
Additionally, reset the fall position on dimension change.

Fixes https://github.com/PaperMC/Folia/issues/99#issuecomment-1610453068
2023-06-27 19:14:35 -07:00
Spottedleaf
633abb1d50 Optimise regionized save on shutdown
When there are many chunkholders and regions, the cost of collecting
and checking tick thread for each one for every region save
becomes the biggest cost for the save call. To avoid this from
happening, collect the chunk holders from the current region's
owned sections.

This showed significant speedup locally when running the
"walk test" found in RegionizedServer locally (>90% of time
was spent on the holder iteration/checking).
2023-06-27 17:14:06 -07:00
Spottedleaf
81fe50f26f Always synchronise on target for regionized queue mergeInto
While for merging the synchronisation occured, it did not synchronise
for splitting. This resolves a possible CME that may occur while
splitting regions.
2023-06-27 13:43:51 -07:00
Sofiane H. Djerbi
0558e7d923 Fix funny respawn animation & respawn button not working 2023-06-25 13:51:15 -07:00
Spottedleaf
7c6e2514d2 Update paper 2023-06-16 10:42:12 -07:00
Spottedleaf
0dd151fd1e Make regioniser more aggressively recalculate regions
This is to try and prevent regions from grouping together
when they really shouldn't be
2023-06-16 10:07:22 -07:00
Spottedleaf
e8e6ac4006 Avoid off-region chunk read for paper entity command
Allow usage of the specific entity command
2023-06-16 10:02:19 -07:00
Spottedleaf
dc7eeddb96 Update paper 2023-06-16 09:48:16 -07:00
Spottedleaf
fa018cc372 Update to 1.20.1
No changes to note
2023-06-13 14:24:31 -07:00
Spottedleaf
db2e6578f8 Clear main supporting position on teleport
It becomes invalid switching dimensions or by moving far. If
it used after teleporting, then it may also trip thread checks.

Fixes https://github.com/PaperMC/Folia/issues/94
2023-06-13 13:52:26 -07:00
Spottedleaf
8a067cdbdd Update leafprofiler to be able to dump to a list of strings
First steps to making this thing useful
2023-06-13 12:21:52 -07:00
Jason Penilla
23b6f9e0ef Fix processUnloads trying to unload for all regions at once 2023-06-12 13:01:23 -07:00
Spottedleaf
b886376c26 Update to latest paper
Make sure the player chunk loader throws when a double-remove
occurs, as that should not be happening on Folia
2023-06-10 14:09:11 -07:00
Spottedleaf
fd838ffbee Update to latest paper
Fix two regionizer issues:

In ThreadedRegionizer#addChunk, fix the incorrect handling
of merging two regions where one of the regions had
pending merges. If the first region had pending merges,
and the second was marked as "ready" then the merge would
cause a "ready" region to have pending merges. The fix is
to simply downgrade the "ready" region to "transient,"
as was previously done if the merge was delayed in the
case where the first region was "ticking."

Additionally, prevent the creation of empty regions
by checking if any new sections were created. This would
happen when a section existed, but had no marked chunks
in it AND all of the sections neighbours existed. In these
cases, no region needs to be created as no sections were
created.
2023-06-09 23:44:24 -07:00
Spottedleaf
d0517f1656 Fix compile / boot 2023-06-08 21:03:13 -07:00
Spottedleaf
1b0a5071d0 Initial patch apply 2023-06-08 20:15:55 -07:00