Treasure: Nether pickaxe takes 10x less wear damage when mining netherrack

cracky-3 mining time of Nether pickaxe reduced from 0.4 to 0.3 to mine netherrack faster.
maxlevel of nether pickaxe dropped from 3 to 2 to increase wear damage with non-netherrack nodes.
This commit is contained in:
Treer 2021-09-19 00:49:29 +10:00
parent 41b6388c16
commit 5895152c60
2 changed files with 22 additions and 5 deletions

View File

@ -71,7 +71,8 @@ minetest.register_node("nether:rack", {
description = S("Netherrack"),
tiles = {"nether_rack.png"},
is_ground_content = true,
groups = {cracky = 3, level = 2},
-- setting workable_with_nether_tools reduces the wear on nether:pick_nether when mining this node
groups = {cracky = 3, level = 2, workable_with_nether_tools = 3},
sounds = default.node_sound_stone_defaults(),
})
@ -81,7 +82,8 @@ minetest.register_node("nether:rack_deep", {
_doc_items_longdesc = S("Netherrack from deep in the mantle"),
tiles = {"nether_rack_deep.png"},
is_ground_content = true,
groups = {cracky = 3, level = 2},
-- setting workable_with_nether_tools reduces the wear on nether:pick_nether when mining this node
groups = {cracky = 3, level = 2, workable_with_nether_tools = 3},
sounds = default.node_sound_stone_defaults(),
})

View File

@ -20,18 +20,33 @@
local S = nether.get_translator
minetest.register_tool("nether:pick_nether", {
description = S("Nether Pickaxe"),
description = S("Nether Pickaxe\nWell suited for mining netherrack"),
_doc_items_longdesc = S("Uniquely suited for mining netherrack, with minimal wear when doing so. Blunts quickly on other materials."),
inventory_image = "nether_tool_netherpick.png",
tool_capabilities = {
full_punch_interval = 0.8,
max_drop_level=3,
groupcaps={
cracky = {times={[1]=1.90, [2]=0.9, [3]=0.4}, uses=35, maxlevel=3},
cracky = {times={[1]=1.90, [2]=0.9, [3]=0.3}, uses=35, maxlevel=2},
},
damage_groups = {fleshy=4},
},
sound = {breaks = "default_tool_breaks"},
groups = {pickaxe = 1}
groups = {pickaxe = 1},
after_use = function(itemstack, user, node, digparams)
local wearDivisor = 1
local nodeDef = minetest.registered_nodes[node.name]
if nodeDef ~= nil and nodeDef.groups ~= nil then
-- The nether pick hardly wears out when mining netherrack
local workable = nodeDef.groups.workable_with_nether_tools or 0
wearDivisor = 1 + (3 * workable) -- 10 for netherrack, 1 otherwise. Making it able to mine 350 netherrack nodes, instead of 35.
end
local wear = math.floor(digparams.wear / wearDivisor)
itemstack:add_wear(wear) -- apply the adjusted wear as usual
return itemstack
end
})
minetest.register_tool("nether:shovel_nether", {