Skip to content
This repository has been archived by the owner on Sep 12, 2022. It is now read-only.

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

Open
rjworks opened this issue Jul 3, 2020 · 2 comments
Open

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

rjworks opened this issue Jul 3, 2020 · 2 comments

Comments

@rjworks
Copy link

rjworks commented Jul 3, 2020

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
Copy link
Contributor

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
Copy link
Author

rjworks commented Jul 9, 2020

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants