mirror of
https://github.com/HybridDog/nether-pack.git
synced 2025-01-27 01:40:19 +01:00
make netherrack and co. digable with creative hand
This commit is contained in:
parent
e8a666f34e
commit
d32ede7e8a
@ -1,4 +1,5 @@
|
|||||||
default
|
default
|
||||||
|
creative?
|
||||||
glow
|
glow
|
||||||
riesenpilz
|
riesenpilz
|
||||||
stairs
|
stairs
|
||||||
|
@ -39,7 +39,8 @@ local function digging_allowed(player, v)
|
|||||||
if not player then
|
if not player then
|
||||||
return false
|
return false
|
||||||
end
|
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
|
if not tool
|
||||||
or not tool.tool_capabilities then
|
or not tool.tool_capabilities then
|
||||||
return false
|
return false
|
||||||
@ -1001,3 +1002,11 @@ minetest.register_tool("nether:sword_white", {
|
|||||||
damage_groups = {fleshy=11},
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user