mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
more test commands
This commit is contained in:
parent
5b2b89c778
commit
1f11290635
5 changed files with 36 additions and 4 deletions
|
|
@ -64,6 +64,9 @@ int l_set_block(lua_State* L) {
|
|||
if (id < 0 || size_t(id) >= scripting::indices->countBlockDefs()) {
|
||||
return 0;
|
||||
}
|
||||
if (!scripting::level->chunks->get(x, y, z)) {
|
||||
return 0;
|
||||
}
|
||||
scripting::level->chunks->set(x, y, z, id, states);
|
||||
scripting::level->lighting->onBlockSet(x,y,z, id);
|
||||
if (!noupdate)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue