From 6b8e0f7c503ee89c4e5e79b0a29bbc9462508f2d Mon Sep 17 00:00:00 2001 From: minefaco <63024226+minefaco@users.noreply.github.com> Date: Sat, 7 Nov 2020 16:44:12 -0500 Subject: [PATCH] Update init.lua disable tree bark drop when creative mode is enabled --- init.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 7e1ddb6..9bdbb76 100644 --- a/init.lua +++ b/init.lua @@ -68,7 +68,11 @@ for _, axe_name in ipairs(axe_types) do if not creative_mode then local inv = user:get_inventory() - inv:add_item("main", {name="default:tree_bark"}) + if inv:room_for_item("main", "default:tree_bark") then + inv:add_item("main", {name="default:tree_bark"}) + else + --drop item + end end return itemstack end