mirror of
https://github.com/minetest-mods/throwing_arrows.git
synced 2025-01-25 01:20:22 +01:00
Fix crash when hit fails with drop arrow
This commit is contained in:
parent
51dba5b870
commit
6c888d0313
2
init.lua
2
init.lua
@ -208,7 +208,7 @@ if get_setting("drop_arrow") then
|
||||
on_hit = function(self, _, last_pos, _, _, hitter, data)
|
||||
minetest.item_drop(ItemStack(data.itemstack), hitter, last_pos)
|
||||
end,
|
||||
on_hit_fails = function(_, thrower, data)
|
||||
on_hit_fails = function(self, _, thrower, data)
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
thrower:get_inventory():set_stack("main", data.index, data.itemstack)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user