durapick/wood.lua
Beanzilla eb2f4192aa
Prevented a collision with durapick and moreblocks
We both were defining something that took group:wood times 9 and returned something.

Now if moreblocks is installed too we just use moreblocks:wood_tile (Same recipe so same resource)
2021-05-07 12:17:06 -04:00

66 lines
2.0 KiB
Lua

local default = rawget(_G, "default") or {}
local morebocks = rawget(_G, "moreblocks") or {}
-- Make such a thing
minetest.register_tool("durapick:wood_pick", {
description = "Durable Wooden Pickaxe",
inventory_image = "durapick_wood.png",
tool_capabilities = {
full_punch_interval = 1.3,
max_drop_level=1,
groupcaps={
-- Changed it so the wood pick has the ability to mine like a steel pick, just slower
cracky = {times={[3]=1.60}, uses=(durapick_durability_wood * durapick_durability_factor), maxlevel=1},
},
damage_groups = {fleshy=4},
},
sound = {breaks = "default_tool_breaks"},
groups = {pickaxe = 1}
})
if moreblocks == nil then
minetest.register_craft({
type = "shaped",
output = "durapick:wood_pick 1",
recipe = { -- Use globals to allow customized recipes
{durapick_resource_wood_post, durapick_resource_wood_post, durapick_resource_wood_post},
{"", durapick_stick, ""},
{"", durapick_stick, ""}
},
})
else
minetest.register_craft({
type = "shaped",
output = "durapick:wood_pick 1",
recipe = { -- Use more blocks instead of our own dura_wood
{"moreblocks:wood_tile", "moreblocks:wood_tile", "moreblocks:wood_tile"},
{"", durapick_stick, ""},
{"", durapick_stick, ""}
},
})
end
minetest.register_node("durapick:dura_wood", {
description = "Dura Wood",
paramtype2 = "facedir",
place_param2 = 0,
tiles = {"durapick_resource_wood.png"},
is_ground_content = false,
groups = {choppy = 2, oddly_breakable_by_hand = 2},
sounds = default.node_sound_wood_defaults(),
})
ItemStack("durapick:dura_wood", 99)
if moreblocks == nil then
minetest.register_craft({
type = "shaped",
output = "durapick:dura_wood 1",
recipe = { -- Use globals to allow customized recipes
{durapick_resource_wood_pre, durapick_resource_wood_pre, durapick_resource_wood_pre},
{durapick_resource_wood_pre, durapick_resource_wood_pre, durapick_resource_wood_pre},
{durapick_resource_wood_pre, durapick_resource_wood_pre, durapick_resource_wood_pre}
},
})
end