Dylan K. Taylor
baba25953f
Chunk: make all parameters of __construct() mandatory and non-nullable
...
having the constructor fill in defaults for these invariably causes bugs.
2021-10-25 20:22:50 +01:00
Dylan K. Taylor
401e8d117b
Flat: use a less dumb way to build biome array
2021-10-25 20:15:33 +01:00
Dylan K. Taylor
092aabeb97
fix CS
2021-10-11 17:21:19 +01:00
Dylan K. Taylor
70deea0ef9
Flat: Move preset handling to a FlatGeneratorOptions unit
2021-10-11 16:53:08 +01:00
Dylan T
4111d92b98
Stop hardcoding chunk dimensions everywhere ( #4443 )
2021-09-10 16:13:25 +01:00
Dylan K. Taylor
654fc9a2a6
LegacyStringToItemParser: Throw more specific exceptions
2021-07-10 21:03:12 +01:00
Dylan K. Taylor
6ce15854af
Clean up generator preset handling
2021-04-13 20:19:53 +01:00
Dylan K. Taylor
b9cd633cee
Chunks no longer exist in un-generated state
...
a non-generated chunk is now always represented by NULL. This forces the case of ungenerated chunks to be handled by all code, which is necessary because ungenerated chunks cannot be interacted with or modified in any meaningful way.
2020-12-03 22:28:43 +00:00
Dylan K. Taylor
c808095978
Chunks no longer contain their own coordinates
2020-12-03 21:59:30 +00:00
Dylan K. Taylor
f991961d9a
Generator no longer requires a ChunkManager to construct
...
this allows injection of arbitrary ChunkManagers into a single Generator instance.
The objective here was to remove the requirement to cache a SimpleChunkManager instance in worker-local storage, because that requires that the chunks it stores be manually removed to avoid memory leaks. However, there are some other obstacles, primarily the worldHeight which is not retained anywhere else.
2020-11-01 16:34:56 +00:00
Dylan K. Taylor
4549522289
Rename Chunk::getSubChunkChecked() -> getSubChunk()
2020-10-31 23:12:03 +00:00
Dylan K. Taylor
b270029161
Rename Chunk::getWritableSubChunk() -> Chunk::getSubChunkChecked()
...
this is not specific to 'writable', it's just an opt-in to checked bounds so that an EmptySubChunk will never be received.
2020-10-31 22:46:33 +00:00
Dylan K. Taylor
01f8116cdd
Fix some of the implicit immutability issues of EmptySubChunk
...
it's useful to have an immutable stub around for the sake of feeding back dummy read values, but for write values it has to barf instead of being quiet.
There's still some issues with LightArray which I don't currently have a solution for, but I'm thinking about separating light storage from chunks anyway.
2020-09-07 14:43:26 +01:00
Dylan K. Taylor
7bcfece11e
Flat: use block names instead of legacy block IDs for hardcoded preset
2020-08-06 12:58:49 +01:00
Dylan K. Taylor
de9856151a
Flat: remove useless field
2020-08-06 12:58:08 +01:00
Dylan K. Taylor
aa682a865e
Allow injecting arbitrary preimage block for ore generation
...
this will be useful for nether ore generation.
2020-08-06 12:46:07 +01:00
Dylan K. Taylor
11ef9fb0c0
Item-from-string parsing no longer depends on ItemIds
...
after this is done I'm banning the constant() function.
2020-05-13 00:18:49 +01:00
Dylan K. Taylor
5a94af40e2
Convert ItemFactory to singleton
2020-04-24 00:18:31 +01:00
Dylan K. Taylor
fb1126797a
Merge branch 'stable'
2020-02-07 18:13:55 +00:00
Dylan K. Taylor
cb16f5c142
Merge commit '260ac47588c76a2e6814cfba46773a990fb8c5da'
...
# Conflicts:
# resources/vanilla
# src/Server.php
# src/lang/Language.php
# src/network/mcpe/protocol/AddItemActorPacket.php
# src/network/mcpe/protocol/AddPlayerPacket.php
# src/network/mcpe/protocol/SetActorDataPacket.php
# src/network/mcpe/serializer/NetworkBinaryStream.php
# src/permission/Permission.php
# src/pocketmine/block/Leaves.php
# src/pocketmine/entity/DataPropertyManager.php
# src/pocketmine/entity/Entity.php
# src/pocketmine/item/Banner.php
# src/pocketmine/item/Item.php
# src/pocketmine/level/format/io/LevelProvider.php
# src/pocketmine/level/format/io/LevelProviderManager.php
# src/pocketmine/network/mcpe/protocol/AddActorPacket.php
# src/pocketmine/network/mcpe/protocol/LoginPacket.php
# src/pocketmine/tile/Banner.php
# src/scheduler/BulkCurlTask.php
# src/updater/AutoUpdater.php
# src/utils/Config.php
# src/utils/Utils.php
# src/world/generator/Flat.php
# src/world/generator/Generator.php
2020-01-31 21:07:34 +00:00
Dylan K. Taylor
465d8cda79
Merge commit 'a5764b3ae98a70fe8f20f9b403a4ab84b51b11d8'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/level/format/io/LevelProvider.php
# src/world/generator/Generator.php
# src/world/generator/GeneratorRegisterTask.php
2020-01-31 19:32:38 +00:00
Dylan K. Taylor
67bcc1c0fb
phpdoc armageddon for master, pass 1
2020-01-22 11:55:03 +00:00
Dylan K. Taylor
02ff8d671b
Mostly phase out EmptySubChunk
...
copy-on-write and zero-layer SubChunk objects are much easier to manage and have less cognitive overhead.
obviously, the goal is to get rid of EmptySubChunk completely, but right now it does still serve a purpose (filling in dummy values for reading out-of-bounds on chunks), and that's a problem that takes a little more work to fix.
2019-10-22 23:00:49 +01:00
Dylan K. Taylor
5499ac620c
Removed pocketmine subdirectory, map PSR-4 style
2019-07-30 19:14:57 +01:00