From e8614d7b276ff3feb51226dd055349ab4e212013 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Tue, 17 Dec 2019 16:58:40 +0100 Subject: [PATCH] Fix a purely theoretical coral crash --- mods/ITEMS/mcl_ocean/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_ocean/init.lua b/mods/ITEMS/mcl_ocean/init.lua index 5d2003e3b..dced76620 100644 --- a/mods/ITEMS/mcl_ocean/init.lua +++ b/mods/ITEMS/mcl_ocean/init.lua @@ -165,7 +165,7 @@ local function coral_on_place(itemstack, placer, pointed_thing) end node_under.name = itemstack:get_name() - node_under.param2 = minetest.registered_items[itemstack:get_name()].place_param2 + node_under.param2 = minetest.registered_items[itemstack:get_name()].place_param2 or 1 if node_under.param2 < 8 and math.random(1,2) == 1 then -- Random horizontal displacement node_under.param2 = node_under.param2 + 8