durapick/wood.lua

66 lines
2.0 KiB
Lua
Raw Normal View History

local default = rawget(_G, "default") or {}
local morebocks = rawget(_G, "moreblocks") or {}
2021-01-21 16:03:14 -05:00
-- 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},
2021-01-21 16:03:14 -05:00
},
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", {
2021-01-21 16:03:14 -05:00
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(),
2021-01-21 16:03:14 -05:00
})
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