Fix number of tool uses being off by 1..32767 (#11110)

This commit is contained in:
Wuzzy
2021-10-31 22:33:33 +00:00
committed by GitHub
parent 38ba813c55
commit 6910c8d920
18 changed files with 229 additions and 71 deletions

View File

@@ -613,7 +613,7 @@ function core.node_dig(pos, node, digger)
if wielded then
local wdef = wielded:get_definition()
local tp = wielded:get_tool_capabilities()
local dp = core.get_dig_params(def and def.groups, tp)
local dp = core.get_dig_params(def and def.groups, tp, wielded:get_wear())
if wdef and wdef.after_use then
wielded = wdef.after_use(wielded, digger, node, dp) or wielded
else