mirror of
https://github.com/minetest-mods/throwing.git
synced 2025-01-09 09:40:26 +01:00
Drop arrow: put the itemstack back to the inventory only in non-creative mode
This commit is contained in:
parent
19f5864d67
commit
2331ccf9b4
@ -173,7 +173,9 @@ if get_setting("drop_arrow") then
|
||||
minetest.item_drop(ItemStack(data.itemstack), hitter, last_pos)
|
||||
end,
|
||||
on_hit_fails = function(_, thrower, data)
|
||||
thrower:get_inventory():set_stack("main", data.index, data.itemstack)
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
thrower:get_inventory():set_stack("main", data.index, data.itemstack)
|
||||
end
|
||||
end
|
||||
})
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user