36 Commits

Author SHA1 Message Date
Dylan K. Taylor
aa399a1109
migrate to new CompoundTag API (#1515) 2017-11-10 15:38:21 +00:00
Dylan K. Taylor
67af4d3b65 Cleaned up PMAnvil implementation 2017-10-29 19:13:58 +00:00
Dylan K. Taylor
5a353012de Clean up some unused imports 2017-10-19 16:39:34 +01:00
Dylan K. Taylor
be2d134994 Added API to allow flagging an entity not to be saved to disk when its chunk is saved (#1452) 2017-10-11 16:09:08 +01:00
Dylan K. Taylor
8fafef2f7f Added tagType parameter to ListTag constructor, remove some boilerplate code 2017-10-08 13:28:01 +01:00
Dylan K. Taylor
d294d5a91b Clarified location table doc for RegionLoader 2017-10-06 09:40:46 +01:00
Dylan K. Taylor
7f5fe137d1 Added some type docs to RegionLoader 2017-10-05 18:47:32 +01:00
Dylan K. Taylor
d0bf0ff083 Imports cleanup 2017-09-28 10:51:05 +01:00
Dylan K. Taylor
38fad4b963 Implement difficulty per-world (#878)
* Moved Server::getDifficultyFromString() to Level
* Added ability to set difficulty in worlds section of pocketmine.yml for generation
2017-09-26 11:16:51 +01:00
Dylan K. Taylor
eebc52e00b Added API method Entity->isClosed() and made Entity->closed protected 2017-08-16 19:30:23 +01:00
Dylan K. Taylor
c3b8be3f60 and more typehints 2017-07-14 10:56:51 +01:00
Dylan K. Taylor
2a7b736f18 Heap of bugfixes, cleanup and PHP 7 upgrades 2017-07-13 19:18:56 +01:00
Dylan K. Taylor
4d874e7e78 static analysis 2017-07-13 16:45:24 +01:00
Dylan K. Taylor
70bd9afd37 Updated leveldb implementation to support MCPE 1.1 worlds 2017-06-30 09:11:26 +01:00
Dylan K. Taylor
a365c831a8 Fixed some doc problems 2017-06-25 12:07:28 +01:00
Dylan K. Taylor
a4b8dd43e6 Removed useless confusing array indices in CompoundTag constructors (#1116) 2017-06-20 12:11:24 +01:00
Dylan K. Taylor
e11f1e94e9 Cleaned up SubChunk implementation 2017-06-19 15:40:31 +01:00
Dylan K. Taylor
a302b4988f Fixed bad values assigned to LongTags
PhpStorm you bitch... why didn't you tell me these were a problem?!
2017-06-08 19:28:29 +01:00
Dylan K. Taylor
890f72dbf2 Type-hinted NBT tag constructors, made getValue() and setValue() more strict, fix dozens of assorted related bugs 2017-06-08 19:17:52 +01:00
Dylan K. Taylor
75863e2a44 OCD commit 2017-06-07 12:54:12 +01:00
Dylan K. Taylor
db93827650 Fix world saving 2017-06-07 12:54:12 +01:00
Dylan K. Taylor
51b0673b4b Bite the bullet and enable strict types on everything 2017-06-07 12:53:16 +01:00
Dylan K. Taylor
4666560731 Removed some tags that don't exist in vanilla McRegion chunks 2017-06-04 13:04:06 +01:00
Dylan K. Taylor
0207b22110 Fixed Mojang world converters barfing on PocketMine-MP generated McRegion worlds
blame @shoghicp
2017-05-21 12:44:42 +01:00
Dylan K. Taylor
eaef2bd169 Fixed some inspections 2017-05-04 12:19:50 +01:00
Dylan K. Taylor
2a59977440 Added various checks for region file validity (#393)
Check size, check header size, check location table offsets point to valid locations, check for shared offsets, prevent issues with corrupted or junk data
2017-04-27 09:14:02 +01:00
JackNoordhuis
c01e0354bd Address #816
Removes redundant compression argument from NBT::readCompressed() and
NBT:: readNetworkCompressed()
2017-04-12 00:42:27 +10:00
Dylan K. Taylor
282095513a Throw exception when attempting to save a non-generated chunk (#367) 2017-02-21 19:24:16 +00:00
Dylan K. Taylor
c21197ef17 Removed entanglement between chunks and providers. WARNING: BREAKING API CHANGES.
- All entity and tile constructors now require a \pocketmine\level\Level instead of a \pocketmine\level\format\Chunk.
- Chunk->getProvider() and Chunk->setProvider() have been removed.
- Chunk::__construct() has had the $provider parameter removed.
- Chunk->unload() has had the unused $save parameter removed.
- ChunkEvents now take a Level parameter instead of going through the Chunk

API bump to 3.0.0-ALPHA4
2017-02-21 17:08:45 +00:00
Dylan K. Taylor
2ff565afe5 Fix heightmap crashes at the corner of chunks
Stupid unpack() return array indices start at 1, not 0 >_<
2017-02-20 10:28:50 +00:00
Dylan K. Taylor
5a12f40074 Only Region file formats are allowed as parameters for RegionLoaders 2017-02-12 12:18:25 +00:00
Dylan K. Taylor
7de7593b89 Improved nibble array re-ordering in most cases by checking for common values 2017-01-18 19:51:43 +00:00
Dylan K. Taylor
b28e38ab26 Move some exceptions out of utils into their relevant namespaces, move some Chunk methods to ChunkUtils for I/O, refactor "colour" -> "color" 2017-01-15 11:31:12 +00:00
Dylan K. Taylor
3bbf2c245a Shut PhpStorm up 2017-01-11 10:11:13 +00:00
Dylan K. Taylor
8902992473 Fix McRegion read corruption errors, close #232
According to the wiki, McRegion heightmap should be ByteArray, not
IntArray. This caused issues with converted worlds with pretty much
every conversion tool. Blame @shoghicp.

IntArray McRegion heightmaps will now be converted to
ByteArray on save.
2017-01-08 21:16:57 +00:00
Dylan K. Taylor
ad0553fbf8 Bump to API 3.0.0-ALPHA2 - READ DESCRIPTION!
Refactored level\format\generic\GenericChunk -> level\format\Chunk.
Re-added support for async chunk sending
Refactored most Level IO into new namespaces for more organisation
Removed LevelDB loader completely (will be re-added at a later date)
2017-01-06 17:13:45 +00:00