From 8ef14dd81faaa4b02c2c904c460737390e122a4c Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Tue, 5 Jan 2021 17:23:24 +0100 Subject: [PATCH] Fix #872 --- mods/ENTITIES/mcl_item_entity/init.lua | 2 +- mods/HUD/mcl_inventory/creative.lua | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/mods/ENTITIES/mcl_item_entity/init.lua b/mods/ENTITIES/mcl_item_entity/init.lua index 946f219978..0340d1a4fb 100644 --- a/mods/ENTITIES/mcl_item_entity/init.lua +++ b/mods/ENTITIES/mcl_item_entity/init.lua @@ -274,7 +274,7 @@ function minetest.handle_node_drops(pos, drops, digger) -- by hand. Creative Mode is intentionally ignored in this case. local doTileDrops = minetest.settings:get_bool("mcl_doTileDrops", true) - if (digger ~= nil and minetest.is_creative_enabled(digger:get_player_name())) or doTileDrops == false then + if (digger ~= nil or (digger:is_player() and minetest.is_creative_enabled(digger:get_player_name())) or doTileDrops == false then return end diff --git a/mods/HUD/mcl_inventory/creative.lua b/mods/HUD/mcl_inventory/creative.lua index a63c85548f..06984f92b1 100644 --- a/mods/HUD/mcl_inventory/creative.lua +++ b/mods/HUD/mcl_inventory/creative.lua @@ -589,7 +589,9 @@ if minetest.is_creative_enabled("") then function minetest.handle_node_drops(pos, drops, digger) if not digger or not digger:is_player() then - return + for _,item in ipairs(drops) do + minetest.add_item(pos, item) + end end local inv = digger:get_inventory() if inv then