fix block.set in headless mode & fix: vctest does not cleanup worlds

This commit is contained in:
MihailRis 2024-12-29 22:41:11 +03:00
parent e278f5992d
commit c33a92abd6
2 changed files with 5 additions and 2 deletions

View File

@ -108,8 +108,10 @@ static int l_set(lua::State* L) {
if (chunksController == nullptr) {
return 1;
}
Lighting& lighting = *chunksController->lighting;
lighting.onBlockSet(x, y, z, id);
if (chunksController->lighting) {
Lighting& lighting = *chunksController->lighting;
lighting.onBlockSet(x, y, z, id);
}
if (!noupdate) {
blocks->updateSides(x, y, z);
}

View File

@ -210,6 +210,7 @@ int main(int argc, char** argv) {
std::cout << "running " << tests.size() << " test(s)" << std::endl;
for (const auto& path : tests) {
passed += run_test(config, path);
fs::remove_all(config.workingDir / fs::u8path("worlds"));
}
print_separator(std::cout);
cleanup(config.workingDir);