mirror of
https://github.com/minefaco/stripped_tree.git
synced 2024-11-19 22:13:50 +01:00
Update init.lua
disable tree bark drop when creative mode is enabled
This commit is contained in:
parent
a86ac9a1b3
commit
6b8e0f7c50
6
init.lua
6
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
|
||||
|
Loading…
Reference in New Issue
Block a user