Check item registered before getting group/drawtype
~ Minor update to check node is registered before trying to retrieve groups or drawtypemaster
parent
728b65667f
commit
3fe36a13aa
10
init.lua
10
init.lua
|
@ -179,8 +179,14 @@ minetest.register_globalstep(function()
|
|||
-- stop standing under slabs --
|
||||
------------------------------- -- Whole section WIP needs cleanup
|
||||
local ch = minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z})
|
||||
local ch_g = minetest.registered_nodes[ch.name].groups
|
||||
local ch_d = minetest.registered_nodes[ch.name].drawtype
|
||||
local ch_g = {}
|
||||
local ch_d = "normal"
|
||||
|
||||
if minetest.registered_nodes[ch.name] then
|
||||
local ch_g = minetest.registered_nodes[ch.name].groups
|
||||
local ch_d = minetest.registered_nodes[ch.name].drawtype
|
||||
end
|
||||
|
||||
local ch_slab = 0
|
||||
local ch_node = 0
|
||||
for k,v in pairs(ch_g) do
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
screenshot.png
BIN
screenshot.png
Binary file not shown.
Before Width: | Height: | Size: 308 KiB After Width: | Height: | Size: 64 KiB |
Loading…
Reference in New Issue