From 08d1543238b1d76fef9bb118117f265ba54cc4ed Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Thu, 24 Oct 2019 19:39:49 +0200 Subject: [PATCH] Don't print warning when trying to craft nothing --- mods/crafting/api.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mods/crafting/api.lua b/mods/crafting/api.lua index 247fad5..a7eb1f1 100644 --- a/mods/crafting/api.lua +++ b/mods/crafting/api.lua @@ -152,6 +152,9 @@ end function crafting.craft(player, wanted, wanted_count, output, items) -- `output` can be any ItemStack value -- Duplicate items in `items` should work correctly + if wanted:is_empty() then + return nil + end local craftdef = crafting.registered_crafts[wanted:to_string()]