From 16a6da3753bc872fb5a1f6d68596cf92d53b58bd Mon Sep 17 00:00:00 2001 From: MihailRis Date: Fri, 29 Nov 2024 17:55:31 +0300 Subject: [PATCH] prevent 'core:empty' item drop --- res/content/base/modules/util.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/res/content/base/modules/util.lua b/res/content/base/modules/util.lua index a4519b53..11e3717b 100644 --- a/res/content/base/modules/util.lua +++ b/res/content/base/modules/util.lua @@ -1,6 +1,9 @@ local base_entities = {} function base_entities.drop(ppos, itemid, count, pickup_delay) + if itemid == 0 or not itemid then + return nil + end return entities.spawn("base:drop", ppos, {base__drop={ id=itemid, count=count,