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
4
init.lua
4
init.lua
@ -68,7 +68,11 @@ for _, axe_name in ipairs(axe_types) do
|
|||||||
|
|
||||||
if not creative_mode then
|
if not creative_mode then
|
||||||
local inv = user:get_inventory()
|
local inv = user:get_inventory()
|
||||||
|
if inv:room_for_item("main", "default:tree_bark") then
|
||||||
inv:add_item("main", {name="default:tree_bark"})
|
inv:add_item("main", {name="default:tree_bark"})
|
||||||
|
else
|
||||||
|
--drop item
|
||||||
|
end
|
||||||
end
|
end
|
||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user