From f97453b3d92c0f0c3fd7a9546a0d6f4dd885580c Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Wed, 1 Feb 2017 16:02:52 +0100 Subject: [PATCH] Don't wear weapons in creative mode --- mods/mobs/api.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/mobs/api.lua b/mods/mobs/api.lua index 72871df17c..0dc56dda39 100644 --- a/mods/mobs/api.lua +++ b/mods/mobs/api.lua @@ -1879,9 +1879,9 @@ end punch_interval = tool_capabilities.full_punch_interval or 1.4 end - if weapon:get_definition() + if minetest.setting_getbool("creative_mode") + and weapon:get_definition() and weapon:get_definition().tool_capabilities then - weapon:add_wear(floor((punch_interval / 75) * 9000)) hitter:set_wielded_item(weapon) end