block inventory auto-position

This commit is contained in:
MihailRis
2024-02-18 23:05:58 +03:00
parent 96032b60ea
commit b06142abb9
4 changed files with 23 additions and 7 deletions
-2
View File
@@ -433,9 +433,7 @@ int l_set_block_rotation(lua_State* L) {
lua::luaint x = lua_tointeger(L, 1);
lua::luaint y = lua_tointeger(L, 2);
lua::luaint z = lua_tointeger(L, 3);
lua::luaint value = lua_tointeger(L, 4);
voxel* vox = scripting::level->chunks->get(x, y, z);
if (vox == nullptr) {
return 0;
+1 -1
View File
@@ -60,7 +60,7 @@ int l_hud_open_block(lua_State* L) {
x, y, z
);
}
scripting::hud->openInventory(
glm::ivec3(x, y, z), layout, scripting::level->inventories->get(id)
);