diff --git a/mods/builtin_item/init.lua b/mods/builtin_item/init.lua index c785e29..95e9f26 100644 --- a/mods/builtin_item/init.lua +++ b/mods/builtin_item/init.lua @@ -32,6 +32,11 @@ minetest.register_entity( if itemtable then itemname = stack:to_table().name end + + if itemname ~= nil and itemname == "default:creative_tool" then + self.object:remove() + end + local item_texture = nil local item_type = "" if minetest.registered_items[itemname] then diff --git a/mods/default/textures/default_creative_tool.png b/mods/default/textures/default_creative_tool.png new file mode 100644 index 0000000..5c6c47d Binary files /dev/null and b/mods/default/textures/default_creative_tool.png differ diff --git a/mods/default/textures/default_creative_tool.xcf b/mods/default/textures/default_creative_tool.xcf new file mode 100644 index 0000000..3ecd65b Binary files /dev/null and b/mods/default/textures/default_creative_tool.xcf differ diff --git a/mods/default/tools.lua b/mods/default/tools.lua index cb2f746..aa13327 100644 --- a/mods/default/tools.lua +++ b/mods/default/tools.lua @@ -85,6 +85,29 @@ else }) end +-- "Creative" Tool + +minetest.register_tool( + "default:creative_tool", + { + inventory_image = "default_creative_tool.png", + tool_capabilities = { + full_punch_interval = 0.5, + max_drop_level = 0, + groupcaps = { + fleshy = {times={[1]=creative_digtime, [2]=creative_digtime, [3]=creative_digtime}, uses=0, maxlevel=1}, + crumbly = {times={[1]=creative_digtime, [2]=creative_digtime, [3]=creative_digtime}, uses=0, maxlevel=1}, + choppy = {times={[1]=creative_digtime, [2]=creative_digtime, [3]=creative_digtime}, uses=0, maxlevel=1}, + cracky = {times={[1]=creative_digtime, [2]=creative_digtime, [3]=creative_digtime}, uses=0, maxlevel=1}, + snappy = {times={[1]=creative_digtime, [2]=creative_digtime, [3]=creative_digtime}, uses=0, maxlevel=1}, + oddly_breakable_by_hand = {times={[1]=creative_digtime,[2]=creative_digtime,[3]=creative_digtime}, uses=0, maxlevel=3}, + }, + range = 20.8, + damage_groups = {fleshy = 1} + } + }) + + -- Pickaxes minetest.register_tool(