mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-28 05:43:43 +01:00
Merge pull request 'Quick fix: Reinstate nil check in on_place_bucket.' (#2018) from kabou/MineClone2:fix-buckets-cauldrons into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/2018 Reviewed-by: AFCMS <afcms@noreply.git.minetest.land> Reviewed-by: cora <cora@noreply.git.minetest.land>
This commit is contained in:
commit
dcfbfd67b8
@ -169,7 +169,7 @@ local function on_place_bucket(itemstack, user, pointed_thing, def)
|
||||
local undernode = get_node(pointed_thing.under)
|
||||
local abovenode = get_node(pointed_thing.above)
|
||||
|
||||
if registered_nodes[undernode.name].buildable_to or get_item_group(undernode.name, "cauldron") == 1 then
|
||||
if registered_nodes[undernode.name] and registered_nodes[undernode.name].buildable_to or get_item_group(undernode.name, "cauldron") == 1 then
|
||||
local result, take_bucket = get_extra_check(def.extra_check, pointed_thing.under, user)
|
||||
if result then
|
||||
local node_place = get_node_place(def.source_place, pointed_thing.under)
|
||||
@ -190,7 +190,7 @@ local function on_place_bucket(itemstack, user, pointed_thing, def)
|
||||
end
|
||||
end
|
||||
return get_bucket_drop(itemstack, user, take_bucket)
|
||||
elseif registered_nodes[abovenode.name].buildable_to or get_item_group(abovenode.name, "cauldron") == 1 then
|
||||
elseif registered_nodes[abovenode.name] and registered_nodes[abovenode.name].buildable_to or get_item_group(abovenode.name, "cauldron") == 1 then
|
||||
local result, take_bucket = get_extra_check(def.extra_check, pointed_thing.above, user)
|
||||
if result then
|
||||
local node_place = get_node_place(def.source_place, pointed_thing.above)
|
||||
|
Loading…
Reference in New Issue
Block a user