Refaltor77/CustomItemAPI

This plugin will corrupt your world (faulty LevelDB re-implementation)

Opened this issue · 0 comments

Due to outdated code here:

$subStream->putByte($blocks->getBitsPerBlock() << 1);
$subStream->put($blocks->getWordArray());

When this plugin encounters PalettedBlockArray with bits-per-block=0, they will be saved with an incorrect format. This error causes PM5 to treat the chunks as corrupted, since PalettedBlockArray with bits-per-block are not supposed to have a length prefix.

The affected code was changed here: pmmp/PocketMine-MP@11d2e1e

Readers, please don't copy-paste PM core code into your plugins. It's a recipe for disaster.

Related issue: pmmp/PocketMine-MP#5911