From 2ac90f8d19a4733e04c9a56a21b32e6081298533 Mon Sep 17 00:00:00 2001 From: Brian Rahardi Date: Tue, 16 Jul 2019 09:40:28 +0700 Subject: [PATCH] drop invalid item instead of erase it --- 3d_armor/init.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/3d_armor/init.lua b/3d_armor/init.lua index 646a2865..b4db921e 100644 --- a/3d_armor/init.lua +++ b/3d_armor/init.lua @@ -110,6 +110,7 @@ end) local function validate_armor_inventory(player) -- Workaround for detached inventory swap exploit local _, inv = armor:get_valid_player(player, "[validate_armor_inventory]") + local pos = player:get_pos() if not inv then return end @@ -140,6 +141,7 @@ local function validate_armor_inventory(player) elements[element] = true; else inv:remove_item("armor", stack) + minetest.item_drop(stack, player, pos) -- The following code returns invalid items to the player's main -- inventory but could open up the possibity for a hacked client -- to receive items back they never really had. I am not certain