diff --git a/init.lua b/init.lua index 1acaf39..c159c48 100644 --- a/init.lua +++ b/init.lua @@ -7,6 +7,7 @@ local MP = minetest.get_modpath("soundblock") dofile(MP.."/api.lua") dofile(MP.."/form.lua") dofile(MP.."/soundblock.lua") +dofile(MP.."/recipe.lua") if minetest.get_modpath("default") then dofile(MP.."/mods/default.lua") diff --git a/recipe.lua b/recipe.lua new file mode 100644 index 0000000..07fbd56 --- /dev/null +++ b/recipe.lua @@ -0,0 +1,10 @@ + + +minetest.register_craft({ + output = "soundblock:block", + recipe = { + {"default:steel_ingot", "default:steelblock", "default:steel_ingot"}, + {"default:steel_ingot", "default:glass", "default:steel_ingot"}, + {"default:steel_ingot", "default:steelblock", "default:steel_ingot"}, + }, +}) diff --git a/soundblock.lua b/soundblock.lua index f0b8718..d99c0d4 100644 --- a/soundblock.lua +++ b/soundblock.lua @@ -74,15 +74,6 @@ minetest.register_node("soundblock:block", { meta:set_int("randomize_position", 0) end, - can_dig = function(pos,player) - if player and player:is_player() and minetest.is_protected(pos, player:get_player_name()) then - -- protected - return false - end - - return true - end, - on_timer = function(pos) local meta = minetest.get_meta(pos) local state = meta:get_string("state")