4231bfdc7e
Relocate biome ID constants to pocketmine\data\bedrock package
2020-11-01 16:53:06 +00:00
b176f4c12f
Switch to BiomeRegistry
...
I accidentally committed this in c869a7f099
and didn't notice. I intended to use it and never noticed.
2020-11-01 16:47:13 +00:00
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
1d551af54a
Merge remote-tracking branch 'origin/stable'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/level/Level.php
# src/pocketmine/level/format/Chunk.php
# tests/phpstan/configs/l7-baseline.neon
2020-11-01 15:58:16 +00:00
4549522289
Rename Chunk::getSubChunkChecked() -> getSubChunk()
2020-10-31 23:12:03 +00:00
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
ddda2d1e64
Remove $create parameter from ChunkManager::getChunk()
...
this restores SimpleChunkManager's behaviour to PM3, removing the need for GeneratorChunkManager (although I'm dubious whether SubChunkExplorer makes any sense in there any more now that we have morton in the mix).
2020-10-31 21:54:51 +00:00
797e0996f4
PopulationTask: Do not include light when serializing chunks (either way)
...
non-populated chunks shouldn't be light-populated anyway, but in some cases they are (bug or plugin interference).
chunks which were already populated might get modified by adjacent chunk populations, which should invalidate their lighting because generation doesn't track which blocks were changed, so the whole chunk should be recalculated.
2020-10-27 18:42:30 +00:00
05ab75b5ce
PopulationTask: do not calculate lighting for chunks
...
we do this ondemand now, which means this is just wasting CPU for the vast majority of generated chunks.
2020-10-27 17:03:57 +00:00
4c0c2ebd24
CS cleanup
2020-10-26 15:56:30 +00:00
9a282e2646
Noise: Improve fastNoise3D performance by ~25-30%
2020-10-17 20:03:19 +01:00
095449e86a
Normal (generator): micro optimisations (and readability improvements)
2020-10-17 19:24:01 +01:00
03de2bcc67
Chunk: simplify heightmap calculation
2020-09-08 23:03:52 +01:00
c7070788f9
Rename and repurpose Block->diffusesSkyLight to blocksDirectSkyLight
...
this new form allows skipping some useless checks during sky light calculation and also allows getting rid of the last hard dependency on core Block classes.
We're getting real close to native light now.
2020-09-08 22:40:05 +01:00
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
3d4470ed8d
added nether quartz ore to nether generation
2020-08-06 13:23:03 +01:00
7bcfece11e
Flat: use block names instead of legacy block IDs for hardcoded preset
2020-08-06 12:58:49 +01:00
de9856151a
Flat: remove useless field
2020-08-06 12:58:08 +01:00
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
5a56f68991
Normal: make gaussian non-static
...
this allows each generator to (potentially) have a different gaussian curve for biome blending, as well as fixing a few phpstan level 7 errors.
2020-06-28 19:08:18 +01:00
db8e094d11
Extract a Gaussian unit from Normal generator
2020-06-28 18:45:52 +01:00
78c270a96e
PopulationTask: check the correct instance
2020-06-28 18:45:51 +01:00
82b3e3398b
make more use of igbinary_serialize() and igbinary_unserialize()
2020-06-17 23:03:03 +01:00
c9af5ce7a9
Convert GeneratorManager to singleton
2020-05-23 10:13:03 +01:00
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
5a94af40e2
Convert ItemFactory to singleton
2020-04-24 00:18:31 +01:00
13d784cd0c
Convert BlockFactory to singleton
2020-04-23 23:45:13 +01:00
accc0da0cb
Chunk no longer depends on BlockFactory
...
really this light population crap shouldn't be in the chunk to begin with, but that's a bit more complicated.
2020-04-23 21:31:28 +01:00
cd71a6204f
Revert "PopulationTask: do not populate light in chunks out of the gate"
...
This reverts commit 42148f0d15
.
2020-02-11 19:43:25 +00:00
42148f0d15
PopulationTask: do not populate light in chunks out of the gate
...
this is a relic from when we needed to store light on disk. Now we can just calculate lighting as-needed instead.
2020-02-11 19:14:01 +00:00
9b6fa8c25b
Merge branch 'stable'
2020-02-11 19:12:39 +00:00
fb1126797a
Merge branch 'stable'
2020-02-07 18:13:55 +00:00
ff63f6d055
fill in more iterable types (master)
2020-02-01 20:19:57 +00:00
f65bf76fd8
Merge commit '799183e13e61e89cc6820ad3132a4147454017c6'
...
# Conflicts:
# resources/vanilla
# src/Server.php
# src/pocketmine/entity/Entity.php
# src/pocketmine/level/format/io/LevelProviderManager.php
# src/pocketmine/tile/Tile.php
# src/world/generator/GeneratorManager.php
2020-01-31 21:26:40 +00:00
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
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
055b13a6cf
strip extra blank lines (php-cs-fixer)
2020-01-22 15:14:10 +00:00
67bcc1c0fb
phpdoc armageddon for master, pass 1
2020-01-22 11:55:03 +00:00
9c06c1a06f
Merge branch 'stable'
2020-01-11 22:36:57 +00:00
cda1143a79
Merge branch 'stable'
2020-01-09 17:17:42 +00:00
a9c09e4517
Merge branch 'next-minor'
2019-12-12 13:52:14 +00:00
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
200bcb485e
Merge branch 'stable'
2019-08-14 18:20:55 +01:00
c533f6a0bd
Implemented partial chunk saving on LevelDB ( #3078 )
2019-08-07 17:39:36 +01:00
5499ac620c
Removed pocketmine subdirectory, map PSR-4 style
2019-07-30 19:14:57 +01:00
5ea31b57ce
First step to namespaces
2014-03-05 23:43:16 +01:00
23b8fc32ff
removed DocBlock header for logo
2014-03-05 11:15:47 +01:00
a529e7566a
Removed not needed network steps, corrected slot methods
2014-03-05 00:54:12 +01:00
9cc9de8dae
New Random block update tick
2014-03-02 17:56:24 +01:00
c9dfdc288d
Updated global Tile code
2014-02-27 12:23:22 +01:00