Dylan K. Taylor
88715c7055
extracted a HeightArray type from Chunk
2020-05-16 18:41:27 +01:00
Dylan K. Taylor
a31240f60b
FastChunkSerializer: added constants for internal flags
2020-05-16 18:06:00 +01:00
Dylan K. Taylor
82d361d75f
extract a BiomeArray unit from Chunk
...
this now also properly validates data read from disk.
2020-05-16 17:36:22 +01:00
Dylan K. Taylor
45f9c61d0f
forward-port of 2f47597d75b514944a2f3f5d293f2fb72dd7fb56 as best it fits
2020-05-13 13:28:35 +01:00
Dylan K. Taylor
ac5cf2443e
convert TileFactory to singleton
2020-04-26 01:11:30 +01:00
Dylan K. Taylor
7d9df6af6f
Convert EntityFactory to singleton
2020-04-24 22:43:02 +01:00
Dylan K. Taylor
3a42c21cc1
wrap up block_id_map in a class
2020-04-24 21:28:27 +01:00
Dylan K. Taylor
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
Dylan K. Taylor
163c3855eb
Merge branch 'next-minor'
...
# Conflicts:
# resources/vanilla
# src/plugin/PluginBase.php
# src/plugin/PluginDescription.php
# src/pocketmine/Player.php
# src/pocketmine/network/rcon/RCON.php
# src/pocketmine/network/rcon/RCONInstance.php
# src/pocketmine/scheduler/AsyncTask.php
# src/pocketmine/tile/Spawnable.php
# src/scheduler/AsyncPool.php
# src/utils/Config.php
# src/utils/Timezone.php
# src/utils/UUID.php
# src/utils/Utils.php
# src/world/format/io/region/RegionLoader.php
2020-04-19 11:13:41 +01:00
Dylan K. Taylor
ca909ebc1d
Merge branch 'next-minor'
2020-03-10 13:05:37 +00:00
Dylan K. Taylor
995309424e
updated pocketmine/nbt dependency
...
this is going to need work on exception handling, but right now it's so inconsistent that it doesn't matter anyway.
2020-03-04 17:53:37 +00:00
Dylan K. Taylor
a633e415ef
FastChunkSerializer: use machine endianness for pack() (thanks @Frago9876543210)
...
this is faster due to not having to reverse bytes. Since we don't use this format for persistence, it's OK to use machine byte order for this.
2020-02-25 15:08:53 +00:00
Dylan K. Taylor
9b6fa8c25b
Merge branch 'stable'
2020-02-11 19:12:39 +00:00
Dylan K. Taylor
d360439c92
FastChunkSerializer: expose a method to disable lighting serialization
...
this is useful for copies which don't care about lighting, such as chunk sending.
2020-02-09 17:48:30 +00:00
Dylan K. Taylor
2375e9519d
RegionWorldProvider: fix CS
2020-02-08 09:34:22 +00:00
Dylan K. Taylor
aac7da6c96
eliminate remaining empty() usages
2020-02-07 21:51:50 +00:00
Dylan K. Taylor
fb1126797a
Merge branch 'stable'
2020-02-07 18:13:55 +00:00
Dylan K. Taylor
e3833ba4f0
Merge branch 'stable'
2020-02-01 21:03:21 +00:00
Dylan K. Taylor
ff63f6d055
fill in more iterable types (master)
2020-02-01 20:19:57 +00:00
Dylan K. Taylor
89c6da13ac
phpstan: use more class-string
2020-01-31 22:05:33 +00:00
Dylan K. Taylor
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
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
9492325eef
Merge branch 'stable'
2020-01-29 20:01:30 +00:00
Dylan K. Taylor
055b13a6cf
strip extra blank lines (php-cs-fixer)
2020-01-22 15:14:10 +00:00
Dylan K. Taylor
67bcc1c0fb
phpdoc armageddon for master, pass 1
2020-01-22 11:55:03 +00:00
Dylan K. Taylor
3ee6887792
populate remaining missing return types, using native returns where possible
...
this is done separately to stable so that stable changes can be integrated easily using an empty merge.
2020-01-19 10:26:35 +00:00
Dylan K. Taylor
96b91af66a
Merge branch 'stable'
2020-01-11 21:41:38 +00:00
Dylan K. Taylor
aba71762e9
master-specific @var annotations
2020-01-09 17:50:01 +00:00
Dylan K. Taylor
cda1143a79
Merge branch 'stable'
2020-01-09 17:17:42 +00:00
Dylan K. Taylor
c73001d65e
Merge commit 'e6a58e269099a7942d157a214beacc6c30f5617d'
2020-01-09 16:46:58 +00:00
Dylan K. Taylor
c36377ea5a
Merge branch 'next-minor'
2019-12-12 19:47:12 +00:00
Dylan K. Taylor
a9c09e4517
Merge branch 'next-minor'
2019-12-12 13:52:14 +00:00
Dylan K. Taylor
3fa628f259
updated NBT dependency
2019-12-09 11:26:43 +00:00
Dylan K. Taylor
705228f427
Chunk: remove useless field defaults
2019-12-08 11:08:07 +00:00
Dylan K. Taylor
6b21f160bd
Chunk: fix type docs for NBTentities and NBTtiles
2019-12-08 11:07:14 +00:00
Dylan K. Taylor
af6cb605c5
Chunk: fix data loss caused by d3d7709ead3203c189f2ac3b79224b3e5e2bf902
2019-12-08 11:02:40 +00:00
Dylan K. Taylor
117e46f639
LevelDB: fix doc comment handling for deserializeLegacyExtraData()
2019-12-04 11:29:41 +00:00
Dylan K. Taylor
5f9ce78814
WorldProviderManager: removed incorrect param doc
...
this was used to trick phpstorm, but PHPStan doesn't like it, and it isn't consistently used anyway.
2019-12-03 12:08:04 +00:00
Dylan K. Taylor
d3d7709ead
Merge branch 'next-minor'
2019-12-03 11:55:45 +00:00
Dylan K. Taylor
eedc9eaee1
Chunk: move protocol-specific getSubChunkSendCount() to network chunk serializer
2019-10-23 18:34:47 +01:00
Dylan K. Taylor
23e2e7c320
Chunk: remove useless instanceof check from collectGarbage()
2019-10-23 18:29:01 +01:00
Dylan K. Taylor
f71eecfe56
Chunk: clean up internals that were designed for variable subchunk stack size
...
this exposed a few bugs in lighting updates too.
2019-10-23 18:27:30 +01:00
Dylan K. Taylor
dddc3e8407
FastChunkSerializer: remove legacy code, simplify encoding
...
this is also faster than the old technique (theoretically).
2019-10-22 23:00:49 +01: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
b7d1d11eb4
Chunk: remove useless field "height"
2019-10-22 23:00:49 +01:00
Dylan K. Taylor
295d14e0d9
Chunk: make setSubChunk() throw exception on invalid Y instead of returning false
2019-10-22 23:00:49 +01:00
Dylan K. Taylor
9d3637c999
Chunk: remove useless proxy field emptySubChunk
2019-10-22 23:00:49 +01:00
Dylan K. Taylor
e1352668d1
LightPopulationTask: Don't overwrite the whole chunk on completion
...
this is more efficient (less data copied for ITC), fixes #2873 , and also fixes terrain changes during task run getting overwritten.
This still leaves the problem that the light information provided may be out of date by the time the task completes, but this is nonetheless a step forward.
2019-10-22 23:00:21 +01:00
Dylan K. Taylor
296825b87e
LightArray: collect garbage on unserialize
...
serialize/unserialize don't preserve const refs, so this is necessary to reassign global refs post-unserialize
2019-10-22 20:09:51 +01:00