Commit Graph

12 Commits

Author SHA1 Message Date
eaef2bd169 Fixed some inspections 2017-05-04 12:19:50 +01:00
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
c01e0354bd Address #816
Removes redundant compression argument from NBT::readCompressed() and
NBT:: readNetworkCompressed()
2017-04-12 00:42:27 +10:00
282095513a Throw exception when attempting to save a non-generated chunk (#367) 2017-02-21 19:24:16 +00:00
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
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
5a12f40074 Only Region file formats are allowed as parameters for RegionLoaders 2017-02-12 12:18:25 +00:00
7de7593b89 Improved nibble array re-ordering in most cases by checking for common values 2017-01-18 19:51:43 +00:00
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
3bbf2c245a Shut PhpStorm up 2017-01-11 10:11:13 +00:00
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
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