1
0
mirror of https://github.com/HybridDog/nether-pack.git synced 2024-11-13 05:50:20 +01:00

make netherrack and co. digable with creative hand

This commit is contained in:
DS 2017-07-08 14:26:15 +02:00 committed by GitHub
parent e8a666f34e
commit d32ede7e8a
2 changed files with 11 additions and 1 deletions

View File

@ -1,4 +1,5 @@
default
creative?
glow
riesenpilz
stairs

View File

@ -39,7 +39,8 @@ local function digging_allowed(player, v)
if not player then
return false
end
local tool = minetest.registered_tools[player:get_wielded_item():get_name()]
local tool = player:get_wielded_item():get_name()
tool = minetest.registered_tools[tool] or tool == "" and minetest.registered_items[tool]
if not tool
or not tool.tool_capabilities then
return false
@ -1001,3 +1002,11 @@ minetest.register_tool("nether:sword_white", {
damage_groups = {fleshy=11},
},
})
-- override creative hand
if minetest.settings:get_bool("creative_mode") then
local capas = minetest.registered_items[""].tool_capabilities
capas.groupcaps.nether = capas.groupcaps.cracky
minetest.override_item("", {tool_capabilities = capas})
end