Commit Graph

343 Commits

Author SHA1 Message Date
Spottedleaf
8af1aef1f1 Update Paper 2024-12-12 07:14:18 -08:00
Spottedleaf
1c0ecd3d18 Use ThreadLocal for CraftBlockStates#DISABLE_SNAPSHOT
We need to use a thread-local to prevent race conditions
across regions.

Fixes https://github.com/PaperMC/Folia/issues/293
2024-12-08 16:36:00 -08:00
Spottedleaf
94d65c398c Update old position/rotation when teleporting entity
This will fix any problems accessing the old position, which
may be outside of the current region.

This might be a fix for https://github.com/PaperMC/Folia/issues/302
2024-12-08 15:16:07 -08:00
Spottedleaf
d8bef962a8 Fix time command
We need to run the time synchronisation on the global region.

Fixes https://github.com/PaperMC/Folia/issues/306
2024-12-08 12:45:19 -08:00
Spottedleaf
61aed65cce Update Paper 2024-12-08 12:39:49 -08:00
Spottedleaf
d4bc33870b Update Paper 2024-12-04 02:56:21 -08:00
Spottedleaf
ff947a77c7 Update to 1.21.4 2024-12-03 19:46:13 -08:00
Spottedleaf
e1601057b3 Ensure ticket updates are processed for task queue reference count
It is possible that when the reference count is retrieved that
the ticket updates have not yet been processed, which means
that the region section at the queued position may not exist or may
become nonexistant while or after the task is being added.

This restructures the reference counting code to now refer to
both a reference counter and a flag indicating whether ticket
updates are processed.

Fixes https://github.com/PaperMC/Folia/issues/262
This issue shows the race condition where the region becomes
nonexistant.
2024-12-03 02:20:29 -08:00
Spottedleaf
f50f36339c Use same position selection during spawn pos selection fallback
If we cannot find a spawn pos in the spawn radius,
use the same fallback logic as when the world type or player's
gamemode does not support spawn selection. This adjusts the spawn
position to not be inside a wall or on water.
2024-12-03 01:59:04 -08:00
Spottedleaf
eb5ec0b932 Adjust shutdown logic to close player inventories
We need to drop items in special containers on shutdown
to prevent them from being lost.

Fixes https://github.com/PaperMC/Folia/issues/148
2024-12-02 23:52:38 -08:00
Spottedleaf
815dd7bae8 Fix compile 2024-12-01 16:54:40 -08:00
Spottedleaf
227b50fe38 Update Paper 2024-12-01 16:13:58 -08:00
Spottedleaf
c937c72ef9 Update Paper 2024-11-28 19:06:32 -08:00
Spottedleaf
88f8af4c06 Use redstone game time for saving chunk tick list 2024-11-27 08:32:43 -08:00
Spottedleaf
97805cb5c9 Update LeafProfiler formatting 2024-11-27 08:07:50 -08:00
Spottedleaf
be8908e2b2 Update to 1.21.3 2024-11-27 07:54:37 -08:00
Spottedleaf
2e7bc0721a Adjust initial world spawn radius load
The spawn selection may actually be farther than 32 blocks,
so we need a larger load radius to prevent a deadlock on startup.

Additionally, re-insert thread checks for sync loads that were
previously in 1.20.
2024-11-14 21:35:50 -08:00
Spottedleaf
5833269c4c Update Paper 2024-11-04 11:15:46 -08:00
Spottedleaf
06d719d57d Do not show end credits
Fixes end portalling not working correctly when the player has
not seen the end credits.
2024-10-21 10:03:18 -07:00
Spottedleaf
7b534ef0bd Update Paper 2024-10-21 09:30:58 -07:00
Spottedleaf
88e0907cad Do not create raids in positions not owned
If a player moves away before the raid is created, then we would
possibly trigger the raid cross-region.

Considering Vanilla doesn't trigger the raid cross-dimension, this
doesn't seem like an important behavior to break.

Fixes https://github.com/PaperMC/Folia/issues/264
2024-08-30 20:04:09 -07:00
Spottedleaf
99ba4bd7be Store projectile owner as CraftEntity
CraftEntity properly tracks the underlying entity handle
when the entity teleports. This resolves a race condition
where if an enderpearl was ticked while its owner was teleporting,
the owner reference would be lost.

Fixes https://github.com/PaperMC/Folia/issues/279
2024-08-30 19:13:44 -07:00
Spottedleaf
2e88b1680f Add watchdog thread
When regions take too long, having the server print the stacktrace
of the ticking region should help debug the cause.
2024-08-30 18:36:46 -07:00
Spottedleaf
d8461e8ec5 Remove toProcessTrackingUnloading
This field is covered by the entity tracker optimisations in Paper,
but currently was not properly maintained - resulting in memory leaks.

Fixes https://github.com/PaperMC/Folia/issues/283
2024-08-30 12:58:17 -07:00
Spottedleaf
11e6f61697 Update Paper 2024-08-28 21:52:48 -07:00
Spottedleaf
bfa3106e76 Update Paper 2024-08-24 13:13:45 -07:00
Spottedleaf
9203a7a887 Update Paper 2024-08-16 15:43:38 -07:00
Spottedleaf
053b04c7a1 Update Paper 2024-08-14 12:34:45 -07:00
Spottedleaf
6a6c933b81 Update Paper 2024-08-10 08:34:42 -07:00
Spottedleaf
e402f963b5 Update to 1.21.1 2024-08-08 18:46:31 -07:00
Spottedleaf
2b8c879897 Update Paper for ConcurrentUtil fix 2024-08-01 17:00:50 -07:00
Spottedleaf
177c892d77 Force prefer spark plugin
This allows the spark plugin to be loaded without setting
the startup flag
2024-08-01 05:51:20 -07:00
Spottedleaf
dafae4f54a Properly merge/split tracker entities
Fixes https://github.com/PaperMC/Folia/issues/256 https://github.com/PaperMC/Folia/issues/255
2024-07-31 19:15:49 -07:00
Spottedleaf
61dcc07256 Disable spark profiler
It's not thread-safe. The plugin instead needs to be used.

Fixes https://github.com/PaperMC/Folia/issues/254
2024-07-31 11:30:22 -07:00
Spottedleaf
13e5373076 Move chunk lists and nearby players to region data
Fixes https://github.com/PaperMC/Folia/issues/253
2024-07-31 08:40:17 -07:00
Spottedleaf
388cdacd1b Initial pass of 1.21
Most significant changes are to portal/teleport logic, there may
be some bugs there. Not really concerned about the passenger
teleport, as Folia had already added support for that.

Not sure how the spark changes are going to work.
2024-07-30 20:09:52 -07:00
Spottedleaf
d79708296e Update Paper 2024-06-19 14:42:39 -07:00
Jason Penilla
36e5e836e8 Build updates
fixes bundler/paperclip
2024-05-30 17:17:04 -07:00
Spottedleaf
151264ebf9 Update Paper 2024-05-30 17:17:04 -07:00
Spottedleaf
509de1c265 Properly use WorldGenRegion structure manager for swamp hut cat generation
Fixes a crash when attempting to retrieve the chunk data,
as Folia does not support off-region sync chunk loads.

Fixes https://github.com/PaperMC/Folia/issues/221
2024-05-30 17:17:04 -07:00
Spottedleaf
1f3ff5ee61 Update Paper 2024-05-30 17:17:04 -07:00
Spottedleaf
087c6ae12a Update Paper 2024-05-30 17:17:04 -07:00
Spottedleaf
e11cf545b9 Update Paper 2024-05-30 17:17:04 -07:00
Spottedleaf
9a9dbd2188 Fix compile errors 2024-05-30 17:17:04 -07:00
Spottedleaf
7c75e53c65 Update to Paper 1.20.6 2024-05-30 17:17:02 -07:00
Jason Penilla
ec6b1729ec
Sync build dependencies with Paper 2024-05-10 15:24:16 -07:00
Spottedleaf
46d3ab50b4 Update to latest Paper 1.20.4 2024-05-09 16:36:04 -07:00
Spottedleaf
25ee657a82 Add missing synchronisation for map data
Fixes possible CME when accessing the map data storage
2024-04-11 17:07:12 -07:00
Spottedleaf
6b9a96f604 Update Paper 2024-04-11 17:03:29 -07:00
Spottedleaf
ef2c697189 Properly handle unticked hopper tick adjustment
For unticked hoppers, we should use MIN_VALUE as a marker
so that they compare equivalently regardless of whether they've
been through a region merge.
2024-03-28 18:43:02 -07:00