forked from VoxeLibre/VoxeLibre
Fix #1358 for real
This commit is contained in:
parent
3e58e989a1
commit
0d7c2c4988
|
@ -178,6 +178,10 @@ end
|
||||||
-- Add the groupcaps from a field in "_mcl_diggroups" to the groupcaps of a
|
-- Add the groupcaps from a field in "_mcl_diggroups" to the groupcaps of a
|
||||||
-- tool.
|
-- tool.
|
||||||
local function add_groupcaps(toolname, groupcaps, groupcaps_def, efficiency)
|
local function add_groupcaps(toolname, groupcaps, groupcaps_def, efficiency)
|
||||||
|
if not groupcaps_def then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
for g, capsdef in pairs(groupcaps_def) do
|
for g, capsdef in pairs(groupcaps_def) do
|
||||||
local mult = capsdef.speed or 1
|
local mult = capsdef.speed or 1
|
||||||
local uses = capsdef.uses
|
local uses = capsdef.uses
|
||||||
|
@ -196,7 +200,6 @@ local function add_groupcaps(toolname, groupcaps, groupcaps_def, efficiency)
|
||||||
groupcaps[g .. "_dig"] = get_groupcap(g, level > 0, mult, efficiency, uses)
|
groupcaps[g .. "_dig"] = get_groupcap(g, level > 0, mult, efficiency, uses)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return groupcaps
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Checks if the given node would drop its useful drop if dug by a given tool.
|
-- Checks if the given node would drop its useful drop if dug by a given tool.
|
||||||
|
|
|
@ -45,7 +45,7 @@ end
|
||||||
-- To make it more efficient it will first check a hash value to determine if
|
-- To make it more efficient it will first check a hash value to determine if
|
||||||
-- the tool needs to be updated.
|
-- the tool needs to be updated.
|
||||||
function mcl_enchanting.update_groupcaps(itemstack)
|
function mcl_enchanting.update_groupcaps(itemstack)
|
||||||
if not itemstack:get_tool_capabilities() then
|
if not itemstack:get_meta():get("tool_capabilities") then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue