Fix many crashes when placing item on unknown node
This commit is contained in:
parent
27481afe06
commit
38cf151806
13 changed files with 41 additions and 12 deletions
|
@ -37,7 +37,9 @@ minetest.register_craftitem("mcl_potions:glass_bottle", {
|
|||
|
||||
-- Try to fill glass bottle with water
|
||||
local get_water = false
|
||||
if def.groups and def.groups.water and def.liquidtype == "source" then
|
||||
if not def then
|
||||
-- Unknown node: no-op
|
||||
elseif def.groups and def.groups.water and def.liquidtype == "source" then
|
||||
-- Water source
|
||||
get_water = true
|
||||
-- Or reduce water level of cauldron by 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue