735 Commits

Author SHA1 Message Date
Dylan K. Taylor
8af6b112d2
WorldManager: log after first chunk's generation has been completed
this is as close as we can get to the actual start of generation.
2021-04-15 14:01:28 +01:00
Dylan K. Taylor
7b21fc8e9d
WorldCreationOptions are now mandatory during creation of worlds 2021-04-15 13:54:58 +01:00
Dylan K. Taylor
203cc7fcef
World: Removed noisy debug message 2021-04-13 22:32:00 +01:00
Dylan K. Taylor
ecf6de3430
WorldManager: Pre-generate a radius of 8 chunks
3 is absurdly small. 8 is a more realistic estimation of what the average player's render distance will be (it's also the default server.properties limit).
3 doesn't even fill the default spawn-radius setting, meaning that delays during player connection would occur anyway due to generation.
2021-04-13 22:15:47 +01:00
Dylan K. Taylor
0f3147f49b
WorldManager: Log progress of spawn terrain generation 2021-04-13 21:28:17 +01:00
Dylan K. Taylor
c90ca37ea3
Fix CS 2021-04-13 21:10:18 +01:00
Dylan K. Taylor
ab176264b4
... 2021-04-13 21:06:37 +01:00
Dylan K. Taylor
9c1b274499
WorldManager::createWorld() now accepts WorldCreationOptions instead of mixed[] 2021-04-13 21:03:25 +01:00
Dylan K. Taylor
6ce15854af
Clean up generator preset handling 2021-04-13 20:19:53 +01:00
Dylan K. Taylor
1e6d97a157
Merge branch 'stable' 2021-04-07 21:25:39 +01:00
Dylan K. Taylor
adbc58f326
TickingChunkLoader: use native return types 2021-03-26 22:55:48 +00:00
Dylan T
f047ecfd2d
Fixed player spawning in ungenerated terrain (#4087)
fixes #4044
fixes #2724

this is significantly more complex than I hoped for, but it's a start... and it works.
2021-03-26 21:36:27 +00:00
Dylan K. Taylor
64886707b2
SubChunkExplorer: avoid repeated shift-right instructions 2021-03-25 23:36:10 +00:00
Dylan K. Taylor
5e9ce92b55
Explosion: don't depend on air having stateID 0 2021-03-25 23:17:33 +00:00
Dylan K. Taylor
0d775f8731
Require ext-chunkutils2 at ^0.2.0 2021-03-23 22:23:17 +00:00
Dylan K. Taylor
aa8c13ec45
Remove dynamic LightArray constants
sad, no constexpr functions :(
2021-03-23 20:23:56 +00:00
Dylan K. Taylor
49438d360d
RegistryUtils: generate ordered doc comments
this makes things easier to find, especially in the large ones like VanillaBlocks.
2021-03-22 16:16:28 +00:00
Dylan K. Taylor
90161f24e3
Added script to update registry/enum docblocks 2021-03-22 16:00:09 +00:00
Dylan K. Taylor
a515b5e1b8
World: remove dead constant Y_MASK 2021-03-19 21:13:56 +00:00
Dylan K. Taylor
5dd0b3ac35
OOOPS
it's a bit too early for this
2021-03-19 21:12:46 +00:00
Dylan K. Taylor
c092a2e836
Separate TickingChunkLoader from ChunkLoader
this makes it possible to keep chunks loaded without ticking them.
2021-03-18 23:19:27 +00:00
Dylan K. Taylor
d1387ebd0a
World: assume that the primary active chunk is not NULL in generateChunkCallback() 2021-03-18 21:56:17 +00:00
Dylan K. Taylor
34bb225566
World: rename some poorly-named fields 2021-03-18 21:33:17 +00:00
Dylan K. Taylor
eb9a68edee
Further refactors to prepare for y=-64 lower limit 2021-03-18 00:08:16 +00:00
Dylan K. Taylor
b844c4266d
Added World::Y_MIN
preparation for Y axis expansion in 1.17
2021-03-17 23:19:49 +00:00
Dylan K. Taylor
5a59afbe2c
Place world conversion backups in <pwd>/backups/worlds instead of <pwd>/world_conversion_backups 2021-03-17 01:21:11 +00:00
Dylan K. Taylor
72de45f0e9
Drop pocketmine/uuid for ramsey/uuid 2021-03-16 23:03:00 +00:00
Dylan K. Taylor
a49ee0d6b0
World: mark addTile() and removeTile() as @internal 2021-02-24 23:42:09 +00:00
Dylan K. Taylor
9a1cef0d4f
Merge branch 'stable' 2021-02-11 22:35:33 +00:00
Dylan K. Taylor
c21ec614fc
Fixed PHPStan 0.12.74 error in WorldManager 2021-02-11 16:54:14 +00:00
Dylan K. Taylor
561fc62232
Merge remote-tracking branch 'origin/stable'
# Conflicts:
#	.github/workflows/main.yml
#	resources/vanilla
#	src/pocketmine/VersionInfo.php
#	src/world/format/io/region/RegionLoader.php
2021-02-03 17:32:47 +00:00
Dylan K. Taylor
3e1ac66abf
Merge branch 'stable' 2021-02-02 13:46:29 +00:00
Dylan K. Taylor
5a1131d72d
Populator: require dependencies explicitly, don't make bad assumptions about fields
this also leaks ChunkManagers on the worker threads because the generator context is long-lived.
2021-01-27 21:08:46 +00:00
Dylan K. Taylor
bbae02264d
Merge branch 'stable' 2021-01-27 20:04:13 +00:00
Dylan K. Taylor
269a389a97
BlockTransaction: added phpstan return type info for getBlocks() 2021-01-25 18:04:42 +00:00
Dylan K. Taylor
69a829db91
Merge remote-tracking branch 'origin/stable' 2021-01-20 22:16:44 +00:00
Dylan K. Taylor
487b5dd11d
Merge branch 'stable' 2021-01-16 19:44:15 +00:00
Dylan K. Taylor
5fa4e284bf
Merge branch 'stable' 2020-12-27 19:35:27 +00:00
Dylan K. Taylor
bcc3e87730
Timings: rename core timers to remove 'timer' from the names
this makes them shorter and more consistent.
2020-12-23 17:52:25 +00:00
Dylan K. Taylor
9228f006d4
Merge remote-tracking branch 'origin/stable'
# Conflicts:
#	composer.json
#	composer.lock
#	resources/vanilla
#	src/CrashDump.php
#	src/PocketMine.php
#	src/pocketmine/Server.php
#	src/pocketmine/item/Bucket.php
#	src/pocketmine/item/Item.php
#	src/pocketmine/level/format/Chunk.php
#	src/pocketmine/level/format/io/leveldb/LevelDB.php
#	src/pocketmine/level/format/io/region/McRegion.php
#	src/pocketmine/network/mcpe/protocol/BatchPacket.php
#	src/pocketmine/tile/Furnace.php
#	src/pocketmine/utils/UUID.php
#	src/utils/ServerKiller.php
2020-12-20 20:54:13 +00:00
Dylan K. Taylor
1e737644de
World: split populateChunk() into two functions
requestChunkPopulation() respects the queue size, orderChunkPopulation() does not.
requestChunkPopulation() should be used for non-essential generation (which mainly includes generation for player use).
orderChunkPopulation() should probably be used by plugins.
2020-12-17 23:49:37 +00:00
Dylan K. Taylor
48623f4e79
World: add additional checks to addEntity() and removeEntity() 2020-12-14 18:55:52 +00:00
Dylan K. Taylor
6f09d472e2
WorldTimings: give timers names that actually make sense 2020-12-13 20:17:46 +00:00
Dylan K. Taylor
1de5fc86c4
PopulationTask: assume that generator has been initialized 2020-12-13 20:00:57 +00:00
Dylan K. Taylor
dd58a95ae5 Move last-known-position tracking to World instead of Entity 2020-12-10 18:28:40 +00:00
Dylan K. Taylor
e925423749 Entity: fix chunk tracking consistency issues, fixed attempted chunk loading in origin world when teleporting to a different position in a different world 2020-12-10 18:13:18 +00:00
Dylan K. Taylor
219cf2126b RegionWorldProvider: make loadRegion() return RegionLoader, fix 3 PHPStan null-reference errors 2020-12-07 19:04:52 +00:00
Dylan K. Taylor
e810a68dd7 Merge branch 'stable'
# Conflicts:
#	build/php
#	composer.lock
#	resources/vanilla
#	src/pocketmine/VersionInfo.php
#	src/pocketmine/level/format/io/region/McRegion.php
2020-12-07 18:57:58 +00:00
Dylan K. Taylor
59cb11dc83 ChunkManager->setChunk() no longer accepts NULL 2020-12-05 18:54:30 +00:00
Dylan K. Taylor
b6df5b974d World->getHighestBlockAt() may still return -1 if the queried column of blocks is all air 2020-12-05 18:14:38 +00:00