Muqsit / WorldStyler

Yet another World Editor plugin for PocketMine... except it's actually fast!
GNU Lesser General Public License v3.0
30 stars 6 forks source link

World does not save the blocks placed using world styler. #24

Open rjworks opened 4 years ago

rjworks commented 4 years ago

I use world styler's block iterator and utils to place blocks on my server and when the server restarts, the blocks I placed are gone. i checked if it was the auto save, but no because blocks placed using my hand are saved on restart

$iterator = new BlockIterator($level); $iterator1->moveTo($x, $y, $z); $iterator1->currentSubChunk->setBlock($x & 0x0f, $y & 0x0f, $z & 0x0f, 16, 0); if ($level1 instanceof Level) { Utils::updateChunks($level1, $posMin->x >> 4, $posMax->x >> 4, $posMin->z >> 4, $posMax->z >> 4); }

jasonw4331 commented 4 years ago

World styler's API doesn't save the chunks by default. You need to do it yourself.

https://github.com/Muqsit/WorldStyler/blob/master/src/muqsit/worldstyler/utils/Utils.php#L111-L117

rjworks commented 4 years ago

World styler's API doesn't save the chunks by default. You need to do it yourself.

https://github.com/Muqsit/WorldStyler/blob/master/src/muqsit/worldstyler/utils/Utils.php#L111-L117

Can I just uncomment that then?