Commit Graph

267 Commits

Author SHA1 Message Date
3afe3b7f44 Merge branch 'stable' into minor-next 2023-07-24 12:02:24 +01:00
86810c5e1c LevelDB: clearer error message 2023-07-19 16:31:10 +01:00
b33a9690e9 LevelDB: simplify condition 2023-07-19 16:30:13 +01:00
1b9c282194 LevelDB: tolerate incorrect number of biome palettes, as long as there are enough for each real subchunk
modern versions save 24 exactly, but previous versions saved more. We don't use the excess, so it's not a problem if they are missing, but this is nonetheless non-compliant with vanilla.
2023-07-19 16:29:14 +01:00
82b75e0ccb LevelDB: Remove happy debug message 2023-07-19 15:21:47 +01:00
6c59912ed5 LevelDB: workaround 0 bpb palettes with a length prefix
this was caused by a plugin overriding the world provider.

related:
-  https://github.com/pmmp/PocketMine-MP/issues/5911
-  https://github.com/Refaltor77/CustomItemAPI/issues/68

fixes #5911
2023-07-19 15:19:33 +01:00
537721fe7d Replace Closure::fromCallable() usages with first-class callables
PHP 8.1 <3
2023-07-19 13:34:42 +01:00
b7210755a7 1.20.10 2023-07-12 13:39:39 +01:00
3abd592b1f Update to pmmp/BedrockBlockUpgradeSchema@3.0.0 2023-07-03 18:07:51 +01:00
eb9f804781 ÂBedrockWorldData: throw less confusing errors on missing version tags 2023-06-19 12:22:50 +01:00
9a67e3d660 PM5-specific changes for 1.20.0.23 beta 2023-06-07 21:08:41 +01:00
8744032ab6 Fixed empty block handling after blockstate ID XOR change 2023-05-29 18:26:23 +01:00
5a9cdef40c Chunk: added DIRTY_FLAGS_ALL and DIRTY_FLAGS_NONE 2023-05-29 17:45:19 +01:00
a49842278a WorldProvider subsystem no longer depends on Chunk
Instead, it provides the data needed to construct the chunk, which doesn't require the provider to be aware of anywhere near as much logic.
2023-05-29 17:44:00 +01:00
ce5e663a73 Assume chunks are dirty by default
having them be clean by default makes no sense. It only makes sense for them to be clean if they were loaded directly from disk without any alterations.

Default clean is a footgun.
2023-05-29 17:22:39 +01:00
c10be0f346 WorldProvider: allow loadChunk() to return additional information about the loaded chunk data
this will be needed for dealing with #5733. I don't plan to fix that before 5.0, but we need to make the appropriate BC breaks now, before release.
2023-05-29 17:03:39 +01:00
f5a1a0c9cb ÂInsert PM data version into blockstates, chunks, entities, tiles and level.dat
this information will allow us to correct for any bugs introduced by past versions.

however, we still need to propagate this information to permit actually using it when loading data.
2023-05-29 16:32:24 +01:00
6beb80b8fe Fixed usages of BlockDataUpgrader which weren't accounting for thrown exceptions 2023-05-02 17:13:31 +01:00
4d0cecbac2 RegionWorldProvider: use provider logger instead of global logger 2023-05-02 16:47:25 +01:00
5fcf5e0c40 LevelDB: log more stuff, stop bailing on recoverable errors 2023-05-02 16:46:45 +01:00
f29e2f7110 WorldProviders now accept Loggers 2023-05-02 15:41:11 +01:00
d80f65ae7c BedrockWorldData: do not load worlds with a newer NetworkVersion than we support
often, protocol updates are done without consideration for the current world format version. We don't want to require the world support to be updated at the same time, since this might delay updates.
2023-05-01 17:53:08 +01:00
096daef0d0 World: added setDisplayName()
this is an obvious use case, and I'm not really sure why it wasn't supported sooner.
2023-05-01 16:29:07 +01:00
b3e94ef1dc Chunk: update documentation 2023-05-01 14:46:30 +01:00
a8dec1adb1 PM5-specific changes for 1.19.80 2023-04-26 23:30:56 +01:00
6cace51a21 Remove unused variable 2023-04-13 12:47:17 +01:00
6703f46a08 Remove random dead TODOs 2023-04-13 12:47:08 +01:00
c3a2199f0e Reduce global usage in world providers 2023-04-13 12:05:37 +01:00
4ba4d556ed Tidy up world version related things
I decided to scrap the max schema ID stuff, since it just adds extra places to forget updating. Instead, it's better to use minor version locks and version metadata, as we do for BedrockData and BedrockProtocol.
2023-03-14 23:27:16 +00:00
777b4d6ac3 PM5-specific updates for 1.19.70 2023-03-14 18:50:04 +00:00
8933064cd5 Fixed missing blockstate upgrader 2023-03-06 17:02:33 +00:00
da5302ca86 BlockStateData: introduce and use current() 2023-02-02 16:21:50 +00:00
6b7a4e2c41 Split up ItemDataUpgrader (preparing for code backport) 2023-02-02 16:08:49 +00:00
e9b994cbc3 Allow limiting max schema ID loaded for item ID upgrading 2023-02-02 15:29:45 +00:00
0e15a8698a BlockStateUpgrader: do not use blockstate version to manage internal schemas
these are no longer reliable.
2023-02-01 22:35:59 +00:00
0a3ecfdae9 Clean up terminology around block state IDs and their handling 2023-01-25 19:01:15 +00:00
7314151c47 LevelDB: code cleanup 2023-01-17 22:47:43 +00:00
7abfc46567 First look at 3D biome support 2023-01-17 21:41:30 +00:00
8fd4918429 Use Filesystem::fileGetContents() in more places 2022-12-25 18:26:53 +00:00
c89df7eb1c Merge remote-tracking branch 'origin/next-minor' into next-major 2022-12-25 18:22:13 +00:00
0d169b4e80 Filesystem: added fileGetContents to reduce ErrorToExceptionHandler boilerplate code 2022-12-25 17:13:51 +00:00
9809909072 BedrockWorldData: remove unused custom fields 2022-12-19 15:06:06 +00:00
de3af9e660 Fix CS 2022-12-19 15:02:59 +00:00
a30c649607 BedrockWorldData: enable commands by default 2022-12-19 14:59:55 +00:00
d7ebabd771 Fixed the client asking to upgrade PM-generated worlds 2022-12-19 14:56:04 +00:00
be1087c071 Accept worlds from 1.19.40 and up 2022-12-19 14:55:24 +00:00
b27c47335c JavaWorldData: remove Bedrock-compatible hacks
we don't need these, since we don't write to Java world formats anymore anyway.
2022-12-19 13:43:28 +00:00
58eec637c1 Constify NBT keys in world data handling
this code is one giant mess that needs to be cleaned up though...
2022-12-19 13:39:41 +00:00
4d79aced07 Merge branch 'next-minor' into next-major 2022-12-15 19:50:27 +00:00
99996b62d6 Align PhpDoc @param tags according to PHP-CS-Fixer 2022-12-06 13:21:20 +00:00