From 3cac4f3037eb933391e69c0764a3d42806ea5cfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikita=20Wi=C5=9Bniewski?= Date: Wed, 31 Jul 2024 21:02:21 +0700 Subject: [PATCH] Patch mcl_ocean to support pickblock --- mods/ITEMS/mcl_ocean/kelp.lua | 4 +++- mods/ITEMS/mcl_ocean/seagrass.lua | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_ocean/kelp.lua b/mods/ITEMS/mcl_ocean/kelp.lua index 530d96093..64e91cebb 100644 --- a/mods/ITEMS/mcl_ocean/kelp.lua +++ b/mods/ITEMS/mcl_ocean/kelp.lua @@ -547,7 +547,7 @@ kelp.surface_deftemplate = { }, }, -- groups.falling_node = is_falling, - groups = { dig_immediate = 3, deco_block = 1, plant = 1, kelp = 1, }, + groups = { dig_immediate = 3, deco_block = 1, plant = 1, kelp = 1, not_in_creative_inventory = 1 }, --sounds = sounds, --node_dig_prediction = nodename, on_construct = kelp.surface_on_construct, @@ -559,6 +559,7 @@ kelp.surface_deftemplate = { --_mcl_falling_node_alternative = is_falling and nodename or nil, _mcl_hardness = 0, _mcl_blast_resistance = 0, + --_vl_pickblock = nodename, } -- Commented properties are the ones obtained using register_kelp_surface. @@ -609,6 +610,7 @@ function kelp.register_kelp_surface(surface, surface_deftemplate, surface_docs) surface_deftemplate.node_dig_prediction = surface_deftemplate.node_dig_prediction or nodename surface_deftemplate.groups.falling_node = surface_deftemplate.groups.falling_node or falling_node surface_deftemplate._mcl_falling_node_alternative = surface_deftemplate._mcl_falling_node_alternative or (falling_node and nodename or nil) + surface_deftemplate._vl_pickblock = surface_deftemplate._vl_pickblock or nodename minetest.register_node(surfacename, surface_deftemplate) end diff --git a/mods/ITEMS/mcl_ocean/seagrass.lua b/mods/ITEMS/mcl_ocean/seagrass.lua index 328328993..732122372 100644 --- a/mods/ITEMS/mcl_ocean/seagrass.lua +++ b/mods/ITEMS/mcl_ocean/seagrass.lua @@ -140,6 +140,7 @@ for s=1, #surfaces do _mcl_shears_drop = { "mcl_ocean:seagrass" }, _mcl_hardness = 0, _mcl_blast_resistance = 0, + _vl_pickblock = surfaces[s][2], }) if mod_doc and surfaces[s][1] ~= "dirt" then doc.add_entry_alias("nodes", "mcl_ocean:seagrass_dirt", "nodes", "mcl_ocean:seagrass_"..surfaces[s][1])