64 Commits

Author SHA1 Message Date
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
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
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
39d5903c3e Remove INT32_MIN and INT32_MAX global constants 2019-08-25 16:09:51 +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
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
73b2669712 remove World->isFullBlock(), add Block->isFullCube(), clean up some BB mess 2019-08-15 16:22:54 +01:00
Dylan T
c533f6a0bd
Implemented partial chunk saving on LevelDB (#3078) 2019-08-07 17:39:36 +01:00
Dylan K. Taylor
4e5b296c8c Tiles now encapsulate positions instead of extending them 2019-08-05 19:33:34 +01:00
Dylan K. Taylor
53ab860db5 first shot making Block not extend Position
this makes some stuff a lot less pretty, but this seems to be the bare minimum necessary to do this task. It can be enhanced later.
2019-08-05 16:44:09 +01:00
Dylan K. Taylor
5499ac620c Removed pocketmine subdirectory, map PSR-4 style 2019-07-30 19:14:57 +01:00