Skip to content
Snippets Groups Projects
Commit 95b2def3 authored by Tim's avatar Tim Committed by Milan
Browse files

merge upstream commit: Bucket: Prevent crashing when placing liquid against a...

merge upstream commit: Bucket: Prevent crashing when placing liquid against a buildable node into an unknown node
parent d2552744
No related branches found
No related tags found
No related merge requests found
......@@ -88,10 +88,11 @@ function bucket.register_liquid(source, flowing, itemname, inventory_image, name
-- check if the node above can be replaced
lpos = pointed_thing.above
local node = minetest.get_node_or_nil(lpos)
if not node
or not minetest.registered_nodes[node.name].buildable_to then
local above_ndef = node and minetest.registered_nodes[node.name]
if not above_ndef or not above_ndef.buildable_to then
-- do not remove the bucket with the liquid
return
return itemstack
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment