531 Commits

Author SHA1 Message Date
Dylan K. Taylor
0f718ea28b Merge commit '8726604899d1a371567141e0831ed570d3233356' 2019-12-25 14:19:35 +00:00
Dylan K. Taylor
f7eea9bebb Merge branch 'stable' 2019-12-13 18:23:01 +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
4651bcf8c3 master: imports cleanup
it was easier to make an empty merge and re-run php-cs-fixer afterwards.
2019-12-11 23:23:03 +00:00
Dylan K. Taylor
c85c1c3c3f Merge commit '82d9e481d2a0a389fbbc6dfd3672fc366127febc' 2019-12-11 23:06:35 +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
48e2473696 Position: mark world field as nullable (equivalent to 39c607cbd5e134a47fa338628d54eea4e45d6bc3) 2019-12-04 22:58:55 +00:00
Dylan K. Taylor
60154d8127 SubChunkIteratorManager: assert type of subchunk to make PHPStan happy
we know this should be a SubChunk, even though it doesn't.
2019-12-04 18:26:18 +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
9aab97578b World: clean up lighting update API 2019-10-23 21:52:39 +01:00
Dylan K. Taylor
3768f3008e World: group light-related functions
i don't know why these were dumped between getBlock() and setBlock() to begin with.
2019-10-23 21:29:00 +01:00
Dylan K. Taylor
f01b7b74ba World: remove setBlockLightAt() and setBlockSkyLightAt() 2019-10-23 21:25:29 +01:00
Dylan K. Taylor
a3b73d95a7 LightUpdate: allow providing effective light levels for propagation, fix #2999 2019-10-23 21:01:19 +01:00
Dylan K. Taylor
f3f9ebf312 SubChunkIteratorManager: added isValid() 2019-10-23 20:21:09 +01:00
Dylan K. Taylor
21e9bca64a World: remove getHeightMap() and setHeightMap()
these are too specialized to be of any use to plugin developers, and they are also misleading - plugin devs often think this refers to the highest block Y coordinate, but it doesn't.
2019-10-23 19:30:06 +01: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
b8c857df64 World: prevent getHighestAdjacentBlockLight() and getHighestAdjacentBlockSkyLight() trying to exceed world bounds
this creates a problem for sky light above y=256, but this problem exists in lots of other places already anyway.
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
Dylan K. Taylor
ebbb99b96b Merge branch 'next-minor' 2019-10-22 19:05:11 +01:00
Dylan K. Taylor
6d24760174 Merge branch 'stable' 2019-10-20 21:25:39 +01:00
Frago9876543210
6e9d2e1c8a InstantEnchantParticle: add Color into constructor (#3118) 2019-09-23 11:43:06 +01:00
Dylan K. Taylor
f755ea6043 DestroyBlockParticle: keep block reference around instead of runtimeID
we'll need this for protocol abstraction
2019-08-27 19:25:55 +01:00
Dylan K. Taylor
f720a58013 RegionWorldProvider: don't assume that path has a trailing directory separator 2019-08-25 19:50:51 +01:00
Dylan K. Taylor
3eea2442a7 move filesystem-related functions to pocketmine\utils\Filesystem 2019-08-25 17:36:50 +01:00
Dylan K. Taylor
39d5903c3e Remove INT32_MIN and INT32_MAX global constants 2019-08-25 16:09:51 +01:00
Dylan K. Taylor
42ffc45c1c world providers: don't assume that getPath() has a trailing directory separator 2019-08-25 15:45:40 +01:00
Dylan K. Taylor
aa006cca0e WorldProviderManager: added getAvailableProviders()
this will be used by standalone CLI conversion tool
2019-08-24 19:59:57 +01:00
Dylan K. Taylor
6a4ae4cb94 remove position parameters from BlockFactory::get() and BlockFactory::fromFullBlock() 2019-08-24 17:19:27 +01:00
Dylan K. Taylor
aa60aa69ee World: fix bug in getNearestEntity()
fuck you PhpStorm
2019-08-21 18:51:08 -04:00
Dylan K. Taylor
e9fd57275a remove LevelEventSound, remove pitch from sounds that don't support it (most of them) 2019-08-21 17:59:00 +01:00
Dylan K. Taylor
3a41a798ad move forced overflow of SetTimePacket to SetTimePacket::create() 2019-08-20 16:24:47 +01:00
Dylan K. Taylor
794c7b2469 clean up imports 2019-08-20 15:59:27 +01:00
Dylan K. Taylor
965177fb74 Server: drop redundant proxy function broadcastPacket()
this is just making it harder to search for broadcast usages, and we want to get rid of all packet broadcasting shit from Server anyway.
2019-08-19 19:30:57 +01:00
Dylan K. Taylor
8557c93f04 remove GenericParticle, work on isolating network crap in particles 2019-08-19 19:26:26 +01:00
Dylan K. Taylor
e52ba7201c add LevelEventPacket::standardParticle() sugar 2019-08-19 19:01:09 +01:00
Dylan K. Taylor
3274db3ddc DustParticle constructor now uses Color object 2019-08-19 18:57:26 +01:00