Commit Graph

32 Commits

Author SHA1 Message Date
fddfa624cf Chunk System and Starlight WIP
Chunk system patch was refactored to take advantage of
newer ConcurrentUtil's concurrent long hash table (which
fixes hash collisions caused by chaining fastutil's long hash
and CHM's hash) plus some other minor improvements.

The chunk system was also merged with Starlight, which mostly
provides a small improvement to ThreadedLevelLightEngine#checkBlock
as the scheduling was rewritten.
2024-06-14 17:19:25 -07:00
9206b1ea14 Fix a few compile errors 2024-06-14 13:07:50 +02:00
7289589315 988 2024-06-14 11:59:44 +02:00
6a05c85176 117 2024-06-13 10:30:39 -07:00
0ef31547a1 Finish API patches 2024-06-13 08:45:43 -07:00
717c16dc69 Patches! 2024-04-23 18:25:14 -07:00
47ee5579ff Begin update to 1.20.5 2024-04-23 10:02:08 -07:00
2a60c836aa [ci skip] Fixup last commit 2024-01-24 14:05:59 +01:00
fae4fc60c9 [ci skip] Move chunk system patch back a bit 2024-01-24 13:07:40 +01:00
88d3d87993 [ci skip] Add more patch identifying comments 2024-01-23 14:34:17 +01:00
15a9af2f5e More more more work 2023-12-05 20:54:55 +01:00
46f4547805 Prepare for 1.20.3 dev 2023-12-05 18:20:55 +01:00
9bf842c13e Chunk system patch 2023-09-22 13:13:57 -07:00
05f9968013 Rebuild patches 2023-09-22 10:59:56 -07:00
86931baedf more more more work 2023-09-21 22:14:58 +02:00
524eeedaa8 So it begins... 2023-09-21 19:18:04 +02:00
ff68512997 Update fluid chunk loading patch 2023-06-08 11:18:51 +02:00
1bda3d4d2a Start working on 1.20 2023-06-07 18:24:39 +02:00
92dd8645a8 More more patches 2023-03-14 19:36:39 +01:00
08ab8edb76 Start working on 1.19.4 2023-03-14 18:11:24 +01:00
ee75b5dc2d Patching patches 2022-12-07 19:32:25 +01:00
b7dd55ce72 API patches 2022-12-07 17:46:46 +01:00
0f1a8717e8 Rewrite chunk system (#8177)
Patch documentation to come

Issues with the old system that are fixed now:
- World generation does not scale with cpu cores effectively.
- Relies on the main thread for scheduling and maintaining chunk state, dropping chunk load/generate rates at lower tps.
- Unreliable prioritisation of chunk gen/load calls that block the main thread.
- Shutdown logic is utterly unreliable, as it has to wait for all chunks to unload - is it guaranteed that the chunk system is in a state on shutdown that it can reliably do this? Watchdog shutdown also typically failed due to thread checks, which is now resolved.
- Saving of data is not unified (i.e can save chunk data without saving entity data, poses problems for desync if shutdown is really abnormal.
- Entities are not loaded with chunks. This caused quite a bit of headache for Chunk#getEntities API, but now the new chunk system loads entities with chunks so that they are ready whenever the chunk loads in. Effectively brings the behavior back to 1.16 era, but still storing entities in their own separate regionfiles.

The above list is not complete. The patch documentation will complete it.

New chunk system hard relies on starlight and dataconverter, and most importantly the new concurrent utilities in ConcurrentUtil.

Some of the old async chunk i/o interface (i.e the old file io thread reroutes _some_ calls to the new file io thread) is kept for plugin compat reasons. It will be removed in the next major version of minecraft.

The old legacy chunk system patches have been moved to the removed folder in case we need them again.
2022-09-26 01:02:51 -07:00
90da9124c5 Re-arrange most chunk system patches to front (#8338)
* Re-arrange most chunk system patches to front

Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
2022-09-01 09:51:59 -07:00
8bf425f456 New work 2022-07-27 21:18:51 +02:00
858aabab7c Move patches over, start with first few 2022-07-27 20:52:03 +02:00
3f1ea3f769 More patches 2022-06-07 21:15:06 +02:00
1148687a8d Prepare for 1.19 dev 2022-06-07 18:52:56 +02:00
979f2cdf25 More more more work 2021-11-23 13:15:10 +01:00
ed6d43ddb0 Prepare for updating server patches 2021-11-23 00:57:41 -08:00
a1d90ea32f AT bullshit 2021-06-16 00:24:12 +02:00
bfc788437f more patches 2021-06-11 17:57:04 -07:00