9 Commits

Author SHA1 Message Date
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
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
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
67bcc1c0fb phpdoc armageddon for master, pass 1 2020-01-22 11:55:03 +00: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
5499ac620c Removed pocketmine subdirectory, map PSR-4 style 2019-07-30 19:14:57 +01:00