From 1fa141d97290cd537bb38764a770c2ae3a520b0f Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 5 Mar 2018 13:35:14 +0100 Subject: [PATCH] Custom node drops now ignore Creative Mode --- mods/ENTITIES/mcl_item_entity/init.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mods/ENTITIES/mcl_item_entity/init.lua b/mods/ENTITIES/mcl_item_entity/init.lua index acd5461a..ef3f6c17 100644 --- a/mods/ENTITIES/mcl_item_entity/init.lua +++ b/mods/ENTITIES/mcl_item_entity/init.lua @@ -207,8 +207,12 @@ local check_can_drop = function(node_name, tool_capabilities) end function minetest.handle_node_drops(pos, drops, digger) + -- NOTE: This function override allows digger to be nil. + -- This means there is no digger. This is a special case which allows this function to be called + -- by hand. Creative Mode is intentionally ignored in this case. + local doTileDrops = minetest.settings:get_bool("mcl_doTileDrops") or true - if minetest.settings:get_bool("creative_mode") or doTileDrops == false then + if (digger ~= nil and minetest.settings:get_bool("creative_mode")) or doTileDrops == false then return end -- 2.11.4.GIT