mirror of
https://github.com/cultom/hammermod.git
synced 2024-08-18 20:14:08 +02:00
make it work with either mintest default game or mineclone2
This commit is contained in:
parent
a11823609f
commit
736c43932b
26
init.lua
26
init.lua
@ -26,16 +26,32 @@ minetest.register_tool("hammermod:steel_hammer", {
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_on_mods_loaded(function()
|
||||||
|
local ingredients = {
|
||||||
|
stick = "default:stick",
|
||||||
|
ironBlock = "default:steelblock",
|
||||||
|
ironIngot = "default:steel_ingot"
|
||||||
|
}
|
||||||
|
|
||||||
minetest.register_craft( {
|
if(minetest.registered_nodes["mcl_core:ironblock"]) then
|
||||||
|
ingredients = {
|
||||||
|
stick = "mcl_core:stick",
|
||||||
|
ironBlock = "mcl_core:ironblock",
|
||||||
|
ironIngot = "mcl_core:iron_ingot"
|
||||||
|
}
|
||||||
|
|
||||||
|
end
|
||||||
|
minetest.register_craft( {
|
||||||
output = 'hammermod:steel_hammer',
|
output = 'hammermod:steel_hammer',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'mcl_core:iron_ingot', 'mcl_core:ironblock', 'mcl_core:iron_ingot'},
|
{ingredients.ironIngot, ingredients.ironBlock, ingredients.ironIngot},
|
||||||
{'', 'mcl_core:stick', ''},
|
{'', ingredients.stick, ''},
|
||||||
{'', 'mcl_core:stick', ''}
|
{'', ingredients.stick, ''}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
end)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
local steelHammerDigs = {}
|
local steelHammerDigs = {}
|
||||||
|
Loading…
Reference in New Issue
Block a user