From ba53b38d1b247198d794d8fcf8b194f6174b9d75 Mon Sep 17 00:00:00 2001 From: Juraj Vajda Date: Mon, 10 Jul 2023 14:02:54 -0400 Subject: [PATCH] 11 Adjust dynamic items in loot chests to make them less OP --- api.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api.lua b/api.lua index 2651b2b..f64f989 100644 --- a/api.lua +++ b/api.lua @@ -985,9 +985,13 @@ function Everness.set_loot_chest_items() local loot_items = {} for name, def in pairs(minetest.registered_items) do + local craft_recipe = minetest.get_craft_recipe(name) + local mod_name = name:split(':')[1] + if def.groups and next(def.groups) and (not def.groups.not_in_creative_inventory or def.groups.not_in_creative_inventory == 0) + and (craft_recipe.items or mod_name == 'default') then table.insert(loot_items, { name = name,